I am new to the Due. Here is my question:
The following code blinks an LED using the Uno board, but not with the Due.
int led = 9;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
analogWrite(led, 220);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
However, the following works with both boards:
int led = 9;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
analogWrite(led, 220);
delay(1000);
analogWrite(led, 0);
delay(1000);
}
Does the Due not allow a call to digitalWrite if analogWrite has already been called?