I have configured a pin as output and now I would like to read its state (High or Low). Is it possible?
In the reference about digitalRead it is not explicit that the pin should be configured as input.
In other words, can I use digitalRead on a pin configured as output?
Thanks
The best way to answer this is to try...
void setup(){ pinMode(13, OUTPUT); digitalWrite(13, HIGH); delay(1000); digitalWrite(13, !digitalRead(13)); //toggle }
Thank you very much.
I was trying to read the status of an output pin drived from Flash CS4 through StandardFirmata 2 but Arduino seemed to not report the change of output pins.
I have solved it commenting the following line in StandardFirmata.pde.
//portValue = portValue &~ portStatus[portNumber];