Arduino RGB LED Tutorial | PWM Pins Programing | Tinker cad Arduino RGB LED ट्यूटोरियल
Video Link: - Click Here for Video Arduino RGB LED Tutorial | PWM Pins Programing | Tinker cad Arduino RGB LED ट्यूटोरियल, everything you need to know. Arduino Circuit: -
RGB LED Digital Pin Programing: -
void setup()
{
pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
void loop()
{
//red
digitalWrite(3, HIGH);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
delay(1000);
//blue
digitalWrite(3, LOW);
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
delay(1000);
//green
digitalWrite(3, LOW);
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
delay(1000);
}
RGB LED PWM Pin Programing: -
int red = 9;
int blue = 10;
int green = 11;
void setup()
{
pinMode(red, OUTPUT);
pinMode(blue, OUTPUT);
pinMode(green, OUTPUT);
}
void loop()
{
setColor(255,255,255);
delay(1000);
setColor(255,0,255);
delay(1000);
setColor(255,255,0);
delay(1000);
setColor(0,255,255);
delay(1000);
setColor(150,0,100);
delay(000);
}
void setColor(int redValue, int blueValue, int greenValue)
{
analogWrite(red, redValue);
analogWrite(blue, blueValue);
analogWrite(green, greenValue);
}
Share, Support, Subscribe!!!
1. PRO KAM EXPLAINED
2. Knowledge KAM
3. PRO KAM
Follow us on
1. Facebook
2. Instagram
3. Pinterest
4. Blogspot
5 Twitter
If you have any other ideas to make me design, you can describe them in the comment section and if I can, I will make a designing video on it.
So I am waiting
#prokam #pro #IDM #Solutions #Hack
0 Comments