-
• #2
Oh wait I changed the option from "save code to RAM" to "save directly to flash" and then back to RAM, and the problem was partially solved. My software PWM leds still turn off after a save().
-
• #3
"save code to RAM" to "save directly to flash" and then back to RAM
You may find that you now have your 'old' code stored in flash memory as well as new code - you can remove that with
reset(true)
.It might help to see http://www.espruino.com/Saving - when saving the contents of RAM (the default) Espruino saves the state of IO (digitalWrite/pinMode/etc) but not the state of PWM.
Probably what you want is to call
analogWrite(B4, 0.1);
from a function calledonInit
, so that it is run automatically at boot.
Hey everyone,
I am doing a simple test with LEDs. I simply wrote
and save()d the code onto my Pico. Whenever I disconnect and reconnect power, the light doesn't turn on! Same with all other pins, including software PWM.
help!