0

I use arduino nano.

When i use this code the rgb light on the fan is showing the colors right

int rossoPin = 11; int verdePin = 12; int bluPin = 10; void setup(){ pinMode(rossoPin, OUTPUT); pinMode(verdePin, OUTPUT); pinMode(bluPin, OUTPUT); } void loop(){ for(int i = 0; i < 256; i++){ rgb(255-i, i, 0); delay(10); } for(int i = 0; i < 256; i++){ rgb(0, 255-i, i); delay(10); } for(int i = 0; i < 256; i++){ rgb(i, 0, 255-i); delay(10); } } void rgb(int red, int green, int blue){ analogWrite(rossoPin, red); analogWrite(verdePin, green); analogWrite(bluPin, blue); }

,but when i use the full controller code it wont work nothing(ex.white color when it's on off state)

FULL CODE: link to the code

  • Your code is for a single RGB LED or a simple dump RGB LED strip. The linked code is for a NeoPixel (WS2812B) strip. Which are you using? – Majenko Sep 7 at 18:04
  • The controller is for an a-rgb strip and I want to control also a single rgb led on a fan, so i have added the function void fanON() which has the above code that works separatly – Ary Carcar Sep 7 at 18:08
  • Does the IR code get correctly received? Honestly I don't want to analyse over 700 lines of code. You should deactivate parts of your code, until you found the problematic code – chrisl Sep 7 at 18:12
  • in the setup i call the function rgb(0, 0, 0); and it supposed to turn off the led when i start the arduino without any input, but the led is showing white. And yes the IR get correctly received. When i press on my ir remote the strip changes color but the led on the fan no->still white – Ary Carcar Sep 7 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.