-
1Step 1: Collect Components
- RGB Leds
- Jumper Wires
- Breadboard
- Arduino Uno
- USB Cable for Arduino
-
2Step 2: Wire Connection
-
3Step 3: Code
RGB Led Chaser Code
int ledpin; int pot = A0; void setup() { for(ledpin=2;ledpin<=8;ledpin++){ pinMode(ledpin,OUTPUT); } } void loop() { for(ledpin=2;ledpin<=8;ledpin++){ int value = analogRead(pot); digitalWrite(ledpin,HIGH); delay(value); } for(ledpin=2;ledpin<=8;ledpin++){ int value = analogRead(pot); digitalWrite(ledpin,LOW); delay(value); } }
-
4Step 4: Code Screenshot
Here is the code screenshot
-
5Step 5: Video and Pics
Pls Support us On Youtube, Subscribe Here #sparkbuzzer
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.