• @user113488

    that's about what you should see in the left pane of the IDE:

    Found PICO_R1_3, 2v05
    >
    Connected to /dev/tty.usbmodem00000000001A1
    >
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v05 (c) 2019 G.Williams
    >
    >save()
    =undefined
    Compacting Flash...
    Calculating Size...
    Writing..
    Compressed 81600 bytes to 6484
    Running onInit()...
    > 
    

    I assume you did the following:

    1. start ide
    2. copy-paste code from https://www.espruino.com/Battery+ChargerĀ­ into the right pane of the ide (the code editor) or click on the Espruino mug
    3. click the Send to Espruino button in the middle divider of the ide
    4. enter save() in the left pane - the console

    I have tested with most recent build 2v05.155, but I assume you have the release 2v05, so I reinstalled the 2v05 release, and for both versions it runs as expected (with no batteries connected).

    So far I did everything connected.

    The save() command stores the uploaded code in the FLASH for good, so when disconnect and reconnect again, Espruino knows what to run. So I tested this as well...

    While disconnected and powered - with some 5V USB charger - you do not ave the console output. But when repowered with USB from computer, you can (re-)connect and you should get this in the console:

    >
    Loading 6484 bytes from flash...
    Running onInit()...
    Found PICO_R1_3, 2v05
    >
    Connected to /dev/tty.usbmodem00000000001A1
    > 
    

    What exactly happened in your case I cannot say. But: did you type save() in the right pane and then upload? ...or do you have a different setup, such as save on upload enabled? I usually do not do that. 'I keep the right to say save() at my terms', not on upload.

About

Avatar for allObjects @allObjects started