Hi
On an Arduino UNO I can read the pin state set with digitalWrite value using readRead but on an an Zero board. The following code works on an UNO/Leonardo but not on an Zero
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, !digitalRead(13) ); // turn the LED on/off
delay(1000); // wait for a second
}
Is there a other way to read the current pin state?