Hi,
I have got a problem with toggling and getting current state of the output pin on Arduino Due and Arduino 1.5.2 software.
The pin stays high all the time and digitalRead(pinnum) always returns 0.
Tried with this code and some variations of it.
int pinnum = 13;
void setup() {
pinMode(pinnum, OUTPUT); // use on-board LED
}
void loop() {
digitalWrite(pinnum, !digitalRead(pinnum));
delay(1000); // wait around for 1 sec (1000 ms)
}
The pin stays high all the time and digitalRead(pinnum) always returns 0. The code I've posted earlier doesn't blink led.
Sorry, forgot to describe the problem in first post. Edited.