@Gordon. For the esp the pin state is saved in array - so that could be used for the toggle.
https://github.com/espruino/Espruino/blob/master/targets/esp8266/jshardware.c#L420
This might just work out of box:
JshPinState jshPinGetState(Pin pin) { //os_printf("> ESP8266: jshPinGetState %d\n", pin); return g_pinState[pin]; }
@JumJum
Once this is up on github, we can take a look and also add it to the esp32 port - or a least document as a todo.
@Wilberforce started
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.
@Gordon. For the esp the pin state is saved in array - so that could be used for the toggle.
https://github.com/espruino/Espruino/blob/master/targets/esp8266/jshardware.c#L420
This might just work out of box:
@JumJum
Once this is up on github, we can take a look and also add it to the esp32 port - or a least document as a todo.