@dhblumenfeld1989 This cannot be the full script. At least a two lines are missing upfront, like:
from network import WLAN
wlan = WLAN(mode=WLAN.STA)
And as a side note: The flash size you get with uos.getfree() is not relevant for memory errors. These are caused by RAM shortage. The size of free RAM is told by gc.mem_free().
And for all people trying to help it is useful to know the firmware version, which can be obtained by uos.uname().
@robert-hh Thanks! Yeah I can do some stuff in the handler, but as far as I can understand it is recommended to keep the handler short and effective. In this case I would like to transmit (LoRaWAN), receive some data etc.
Anyway - thanks for the help - I'll figure something out. :)
Hi, thank you for the answer, I think I missed something during the procedure because I tried again from scratch and it works perfectly.
I think I forgot an environment variable as you propose.
@Colateral Did you build mpy-cross? It is the Python byte code compiler needed in the build process. to do that, do to micopython/mpy-cross and issue:
then got back to microypthon/esp32 and retry the build. If it fails at the step, when loading into the device, the access rights for the port may be wrong. You can then either run under sudo, or put your account into the dialout group with:
sudo addgroup <yourname> dialout
Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.