-->
Page 1 of 1

PWM not working always HIGH or LOW 2.1 git version

PostPosted: Thu Jan 07, 2016 7:27 am
by tontito
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

Re: PWM not working always HIGH or LOW 2.1 git version

PostPosted: Fri Jan 08, 2016 3:37 pm
by tontito