• @gdanov:
    See targets/stm32_ll/main.c

    bool buttonState = false;
    [#ifdef](http://forum.espruino.com/searc­h/?q=%23ifdef) BTN1_PININDEX
      buttonState = jshPinInput(BTN1_PININDEX) == BTN1_ONSTATE;
      jsiInit(!buttonState); // pressing USER button skips autoload

    The code is for the stm32, but it could be replicated for ESP32. Define BTN1_PININDEX (maybe jshardware.c?) and use this code. Actually it would be nice to have it in every board.


Avatar for GermanWarez @GermanWarez started