-->
Page 1 of 1

NodeMCU + RGB

PostPosted: Mon Jun 22, 2020 11:15 am
by madeskjet
Code: Select allconst int RED = 5;
const int GREEN = 4;
const int BLUE = 0;

void setup() {
  pinMode(RED, OUTPUT);
  pinMode(GREEN, OUTPUT);
  pinMode(BLUE, OUTPUT);
}

void loop() {
  digitalWrite(RED, HIGH);
  digitalWrite(GREEN, LOW);
  digitalWrite(BLUE, LOW); 
  delay (1000);
  digitalWrite(RED, LOW);
  digitalWrite(GREEN, LOW);
  digitalWrite(BLUE, LOW);
  delay (1000);
}


Not work like expected...
LED RGB never off on LOW STATE.

What happen?

Re: NodeMCU + RGB

PostPosted: Tue Jun 23, 2020 11:55 am
by QuickFix
You did something wrong perhaps? :?

Sorry, we can't give you any advice until you give us some more info about how you connected your hardware (for instance: GPIO5 is not D5, but D1 and so on).
Show us what you have (and what you've tried yourself already) so we can get a clearer picture. :idea: