On the subject of "ghost code" make sure you haven't created a reset function. I accidentally did this and then new code downloads were not replacing the code on the pico but adding to it!
I have also been experiencing some different behaviour on battery. A fairly simple blinking light program is running significantly faster on 4xAAA than on USB and on a CR2032 (for which the timing seems to be ok). Is that to be expected?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
On the subject of "ghost code" make sure you haven't created a reset function. I accidentally did this and then new code downloads were not replacing the code on the pico but adding to it!
I have also been experiencing some different behaviour on battery. A fairly simple blinking light program is running significantly faster on 4xAAA than on USB and on a CR2032 (for which the timing seems to be ok). Is that to be expected?