So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By madeskjet
#87617
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?
User avatar
By QuickFix
#87632 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: