Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWM not working always HIGH or LOW 2.1 git version #1382

Closed
tontito opened this issue Jan 7, 2016 · 8 comments
Closed

PWM not working always HIGH or LOW 2.1 git version #1382

tontito opened this issue Jan 7, 2016 · 8 comments

Comments

@tontito
Copy link

tontito commented Jan 7, 2016

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

@SmartArduino
Copy link

It's worked in my case using your code. I use ESP-13 based module(ESPduino).

@tontito
Copy link
Author

tontito commented Jan 8, 2016

İ'm using esp-07 and esp-12

Not working pwm

Analogwrite (50-100-200) always High
Analogwrite (0) low

@SmartArduino
Copy link

Change to 2.0 version may solve your prolem.
As I'm using pwm to control a rgb led light via tcp client, I found it worked well in 2.0 version(sdk is 1.3), but something not good under 2.1 version(sdk is 1.5).

@tontito
Copy link
Author

tontito commented Jan 8, 2016

i tested 2.0 stable version it`s worked but 2.1 github version not working.

@tablatronix
Copy link
Contributor

Same problem here, spent all day thinking I was doing something wrong.
Rolled back to 2.0 and its working fine.

esp 12, sdk 1.6.6

// simple test, 2.0 blue led blinks, 2.1 it doesnt.
const int pin = 2;
void setup() {
  pinMode(pin,OUTPUT);
  digitalWrite(pin,HIGH);
  Serial.begin(115200);
}
void loop() {
  analogWrite(pin, 1020);
  delay(100); 
  analogWrite(pin, 1);
  delay(100); 
}

@tablatronix
Copy link
Contributor

revert 1ae4230

@tablatronix
Copy link
Contributor

typo fix works for me now
1ae4230#commitcomment-15344434

@tontito
Copy link
Author

tontito commented Jan 8, 2016

fix works for me now
1ae4230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants