Pages: [1]   Go Down
Author Topic: lighting up LEDs in concentric circles  (Read 528 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to create a display of LEDs that consists of concentric circles, beginning with one point and growing outwards. How would I write a sketch to make each concentric circle light up one after the other? Preferably, the center would light up first and then the next circle outside of that would light up one after the other until the outer edge lights up, then it would move back to the center again.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 323
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

depending on how many circles there are, i would attach each one to an output pin, via either a relay or a transistor to power them, then just code the pin HIGH accordingly,

i would go for the transistor over a realy for the fact that you could use pwm to make some nice fading effects,
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I would like to create a display of LEDs that consists of concentric circles, beginning with one point and growing outwards
How many LEDs in total?
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Knight Rider/Larson Scanner sketches will work for this application.

Something like http://www.instructables.com/id/8-LED-Larson-Scanner-with-Arduino/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I guess if I'm limited to the 14 ledpins and the first circle began with one single LED, the outer edge circle would be 50-60 LEDs on the last pin. Then every circle in between would be less and less til the center. Is this possible'?

Also, could I first program one LED per pin first, making them light up one at a time down the line? Then I would add transistors and resistors and more LEDs accordingly.

Thank you guys!! I'm brand new to this whole thing and this forum is very helpful:) I really appreciate it.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 323
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made a simple knightrider sketch from scratch for one of my first experiments, its dead easy ,

if you dont need to control the flash cycle then just do

digital.write(pinnumber,HIGH); to turn a pin on and digital.write(pinnumber,LOW); to turn off when you want,

use
delay(TIME IN MILLISECONDS); to create the pauses,

you have to setup the code with some definitions of pins etc but its really easy

good luck
Logged

Pages: [1]   Go Up
Jump to: