Question
Plz help me out with this code for RGB ardrunio: This code is for 3 RGB leds. I want to add push in this code:
Plz help me out with this code for RGB ardrunio:
This code is for 3 RGB leds. I want to add push in this code:
Plz add the push button to change colors for 3RGB leds by using same code:
follow this SCHEMATICS adding two more RGB leds and push button also provide SCHEMATIC
int buttonPin = 0; int red = 11; int green = 10; int blue = 9; int red2=8; int green2=7; int blue2=6; int red3=5; int green3=4; int blue3=3;
void setup() { pinMode(buttonPin, INPUT_PULLUP); pinMode(red, OUTPUT); pinMode(green, OUTPUT); pinMode(blue, OUTPUT); pinMode(buttonPin, INPUT_PULLUP); pinMode(red2, OUTPUT) ; pinMode(green2, OUTPUT) ; pinMode(blue2, OUTPUT) ; pinMode(buttonPin, INPUT_PULLUP); pinMode(red3, OUTPUT) ; pinMode(green3, OUTPUT) ; pinMode(blue3, OUTPUT); }
void loop() { digitalWrite(red, HIGH); digitalWrite(green, LOW); digitalWrite(blue, LOW); delay(1000); digitalWrite(red, LOW); digitalWrite(green, HIGH); digitalWrite(blue, LOW); delay(1000); digitalWrite(red, LOW); digitalWrite(green, LOW); digitalWrite(blue, HIGH); delay(1000); digitalWrite(red2, HIGH); digitalWrite(green2, LOW); digitalWrite(blue2, LOW); delay(1000); digitalWrite(red2, LOW); digitalWrite(green2, HIGH); digitalWrite(blue2, LOW); delay(1000); digitalWrite(red2, LOW); digitalWrite(green2, LOW); digitalWrite(blue2, HIGH); delay(1000); digitalWrite(red3, HIGH); digitalWrite(green3, LOW); digitalWrite(blue3, LOW); delay(1000); digitalWrite(red3, LOW); digitalWrite(green3, HIGH); digitalWrite(blue3, LOW); delay(1000); digitalWrite(red3, LOW); digitalWrite(green3, LOW); digitalWrite(blue3, HIGH); delay(1000);
RGB LED US IT 01 AREF GND RESET 140X1 RXOCO DIGITAL PUN ICSPA O UNO TX RX NO Arduino ICSP WER ANALOG IN IGREF RESET ENE AS CND NEM AD TVStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started