Hi. I have a piece of code that works perfectly on the Arduino Leonardo while on the ESP8266 it no longer works. Here is the code:
.
On the Arduino Leonardo and ESP8266 I have two cables connected to pin 4 and GND.
On the Arduino Leonardo, when I short-circuit the cables, the LED on the board lights up and stays on until I short-circuit the cables again to make it go out (it remembers the state). On the ESP the LED only lights up when the cables are shorted and does not remember the state.
Why the difference? What can be done to make the ESP behave the same as the Leonardo in this particular case?
Code: C#
On the Arduino Leonardo and ESP8266 I have two cables connected to pin 4 and GND.
On the Arduino Leonardo, when I short-circuit the cables, the LED on the board lights up and stays on until I short-circuit the cables again to make it go out (it remembers the state). On the ESP the LED only lights up when the cables are shorted and does not remember the state.
Why the difference? What can be done to make the ESP behave the same as the Leonardo in this particular case?