Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By tontito
#38129 Hi,

PWM not working always HIGH or LOW 2.1 git version 
SDK 1.5

int ledPin = 5; // LED connected to digital pin 5
void setup() {
pinMode(ledPin, OUTPUT);
analogWriteRange(255);
}

void loop() {
for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {
analogWrite(ledPin, fadeValue);
delay(30);
}

for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {
analogWrite(ledPin, fadeValue);
delay(30);
}
}

Led high or low