int greenPin=9, redPin= 10, bluePin=11; /*RGB LED pins defined*/ void setup() { pinMode(redPin, OUTPUT); /*Red pin defined as output*/ pinMode(greenPin, OUTPUT); /*Green pin defined as output*/ pinMode(bluePin, OUTPUT); /*Blue pin defined as output*/ } void loop() { RGB_output(255, 0, 0); //Set RGB color to Red delay(1000); RGB_output(0, 255, 0); //Set RGB color to lime delay(1000); RGB_output(0, 0, 255); //Set RGB color to blue delay(1000); RGB_output(255, 255, 255); //Set RGB color to white delay(1000); RGB_output(128, 0, 0); //Set RGB color to maroon delay(1000); RGB_output(0, 128 , 0); //Set RGB color to green delay(1000); RGB_output(128, 128, 0); //Set RGB color to olive delay(1000); RGB_output(0, 0, 0); //Set RGB color to black delay(1000); } void RGB_output(int redLight, int greenLight, int blueLight) { analogWrite(redPin, redLight); //write analog values to RGB analogWrite(greenPin, greenLight); analogWrite(bluePin, blueLight); }
How may I set my 4 pcs of 4 pin rgb led module to my 4 pcs of speakers to super slow changing colors such as 10 seconds delay transition colors of fading rgb and switch automatically to music reactive mode when there is playing music or songs on my videoke and turn back automatically to super slow changing colors of red green blue when there's no music playing or in standby mode?
What if i want to power the rgb via pwm ? since it is just one output how am i supposed to regulate analogue values for color for every r g b pin on the led? and would it work for me to split the line into three and just analoguewrite the duty cycle on pwm so it lets led shine in white with different brightness?
int greenPin=9, redPin= 10, bluePin=11; /*RGB LED pins defined*/
void setup() {
pinMode(redPin, OUTPUT); /*Red pin defined as output*/
pinMode(greenPin, OUTPUT); /*Green pin defined as output*/
pinMode(bluePin, OUTPUT); /*Blue pin defined as output*/
}
void loop() {
RGB_output(255, 0, 0); //Set RGB color to Red
delay(1000);
RGB_output(0, 255, 0); //Set RGB color to lime
delay(1000);
RGB_output(0, 0, 255); //Set RGB color to blue
delay(1000);
RGB_output(255, 255, 255); //Set RGB color to white
delay(1000);
RGB_output(128, 0, 0); //Set RGB color to maroon
delay(1000);
RGB_output(0, 128 , 0); //Set RGB color to green
delay(1000);
RGB_output(128, 128, 0); //Set RGB color to olive
delay(1000);
RGB_output(0, 0, 0); //Set RGB color to black
delay(1000);
}
void RGB_output(int redLight, int greenLight, int blueLight)
{
analogWrite(redPin, redLight); //write analog values to RGB
analogWrite(greenPin, greenLight);
analogWrite(bluePin, blueLight);
}
Thx very helpful
the code is different from the link provided
Informative video sir
Thank you
How may I set my 4 pcs of 4 pin rgb led module to my 4 pcs of speakers to super slow changing colors such as 10 seconds delay transition colors of fading rgb and switch automatically to music reactive mode when there is playing music or songs on my videoke and turn back automatically to super slow changing colors of red green blue when there's no music playing or in standby mode?
Kuch Samag Nahi aaya magar achha laga sunkar
What if i want to power the rgb via pwm ? since it is just one output how am i supposed to regulate analogue values for color for every r g b pin on the led? and would it work for me to split the line into three and just analoguewrite the duty cycle on pwm so it lets led shine in white with different brightness?
how to install just_red library to continue loading? pls. reply
The link for the code is not working :( can you please help.
Will rectify it soon today
It’s available now, you can download it now
@@MOUNTDYNAMICS Thanks I got it :)
No problem
@@MOUNTDYNAMICS I think you might have made a mistake, the code on the link is for an LCD
im trying to follow the code on the video but im having errors when i upload the code
Mail us your Error in detail, we shall try to clear that doubt of yours
@@MOUNTDYNAMICS where can i email you?
i would appreciate if you could help me out :)
Mountdynamics@gmail.com