how to build LED chaser using arduino uno
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
rgb_led_chaser.inoArduino Codeino - 380.00 bytes - 05/22/2020 at 17:55 |
|
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);
}
}
Create an account to leave a comment. Already have an account? Log In.
Guys show your love❤️ by subscribing🔔 our channel on youTube #sparkbuzzer
Become a member to follow this project and never miss any updates
Really think there's a neat teaching opportunity from this design. Obviously one option is to then demonstrate how you can generate much more "interesting" patterns using different loop programming structures. Another thing you could demonstrate is how a shift register could take the output lines required down to as few as one while achieving comparable output. Thanks for sharing!