Is it possible to trick the Arduino IDE into reading data from pins that only exist in software?
Posted: Tue Sep 22, 2020 12:38 am
For example, the ESP32 has 34 GPIO pins. On n pin 4 you connect a push button, and on pin 5 you connect an LED. Under normal circumstances, you would write your code such that if pin 4 reads LOW (button pressed), pin 5 outputs HIGH and the LED turns on.
Now, is there a way to send the raw data from pin 4 to an artificially created pin - say, pin 36 - such that you could run the same program from above? The only deference being the program references pin 36 instead of pin 4 for turning on the LED.
I don't want to create an abstraction above the Arduino IDE. The Arduino IDE has to think this pin is an honest to goodness pin so that any random user can use whatever existing libraries they like. Could I possibly modify the ESP32 board files that the IDE references to give it this functionality?
Now, is there a way to send the raw data from pin 4 to an artificially created pin - say, pin 36 - such that you could run the same program from above? The only deference being the program references pin 36 instead of pin 4 for turning on the LED.
I don't want to create an abstraction above the Arduino IDE. The Arduino IDE has to think this pin is an honest to goodness pin so that any random user can use whatever existing libraries they like. Could I possibly modify the ESP32 board files that the IDE references to give it this functionality?