Can someone try this code? For some reason, pin 24 wont output PWM for me.
void setup()
{
pinMode(5, PWM);
pinMode(9, PWM);
pinMode(14, PWM);
pinMode(24, PWM);
analogWrite(5, 0);
analogWrite(9, 0);
analogWrite(14, 0);
analogWrite(24, 0);
analogWrite(5, 65535/2);
delay(2000);
analogWrite(5, 0);
delay(1000);
analogWrite(9, 65535/2);
delay(2000);
analogWrite(9, 0);
analogWrite(24, 65535/2);
// digitalWrite(24, HIGH);
delay(2000);
analogWrite(24, 0);
// digitalWrite(24, LOW);
delay(1000);
analogWrite(14, 65535/2);
delay(2000);
analogWrite(14, 0);
toggleLED();
while(1);
}
void loop();
I tested the pin with the digitalWrite(), but that worked fine. Is there some firmware problem with PWM24?