PDA

View Full Version : Vegas lights



ERM
10-25-2009, 10:50 AM
Hi Guys,

Well, was in Vegas not too long ago and saw an interesting effect I've been trying to replicate. I was watching a slot machine and noticed it had an LED border around the sign above the machine. It had many different patterns to it. The one pattern that got me interested was a sequencing pattern with a fade. It almost looked like what I would call a comet tail.

The effect was as follows: The first LED would light up (on), the next LED would then light up (on) and the first LED would dim just a little. When the third LED lit, the second LED would dim a little and the first a little more. You get the picture. As the LEDs sequenced around the sign, it would have a little tail behind it fading in intensity until off.

The thing that is driving me crazy is how to do this. Is this a PWM setup and how? I'm having difficulty arranging the code. Is there something else that would work other than PWM? Thanks in advance.

Tony

PJ Allen
10-25-2009, 11:44 AM
So, you mean, like...·this (http://www.youtube.com/watch?v=qp-7i9uWu64)?

ERM
10-26-2009, 10:53 PM
Exactly

sstone86
10-27-2009, 02:00 AM
That's awesome! Share the source code?

dandreae
10-28-2009, 10:46 PM
There is a Nuts & Volts article that will get you started with this project·called "Tricks and Treats with LEDs" (Column #126).· It basically shows you how to fade LEDs.· Here is a link for the download:· http://www.parallax.com/dl/docs/cols/nv/vol6/col/nv126.pdf



Dave



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae

Parallax Tech Support·

ERM
10-29-2009, 01:51 AM
From what I gather, their using capacitors to do the fade. These slot machines changed patterns from that Dragon Tail to quick flashes, so having the caps in there would not allow you to change to other patterns.

hover1
10-29-2009, 02:18 AM
It can all be done in software using Pulse Width Modulation (PWM). Do a search in the forums, there are lots of examples.

PJ Allen
10-29-2009, 08:30 AM
Don't write any articles for Nuts & Volts (that's all I ask), just have fun (http://forums.parallax.com/showthread.php?p=778772) with it.

ERM
10-30-2009, 11:40 AM
Thanks PJ, that's exactly what I was looking for. Very cool.

Mike2545
11-01-2009, 07:17 AM
This is a video of what I did with your code...thanks Mr.Allen

www.youtube.com/watch?v=p3T49yu19hE (http://www.youtube.com/watch?v=p3T49yu19hE)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545

This message sent to you on 100% recycled electrons.

Post Edited (Mike2545) : 11/1/2009 12:25:24 AM GMT

PJ Allen
11-01-2009, 10:27 AM
·Far out!

Mike2545
11-02-2009, 02:14 AM
After playing with the code I decided to randomize it a bit, the progression and speed are both determined with the Random command.

I removed the led on pin 15, this allows for a different pattern and for me to put this into a PIC chip (only 15 output ports on the 18F1320)

www.youtube.com/watch?v=sKdc19odSrU (http://www.youtube.com/watch?v=sKdc19odSrU)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545

This message sent to you on 100% recycled electrons.

PJ Allen
11-02-2009, 02:52 AM
I like the idea of changing the speed +/-, the randomness of direction leaves me unsettled.·

Changing speed gradually (not abruptly going from·fast to slow) would be a good effect.· The "random" aspect would be whether to +/-/RTS at some interval (or non-interval.)

Mike2545
12-09-2009, 11:12 AM
I took you "unsettled" remark to heart and changed the program to a smoother transition and also put the project in a small project enclosure.

s404.photobucket.com/albums/pp129/mike2545_photo/?action=view&current=CIMG2634.flv (http://s404.photobucket.com/albums/pp129/mike2545_photo/?action=view&current=CIMG2634.flv)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545

This message sent to you on 100% recycled electrons.

PJ Allen
12-10-2009, 10:31 AM
Groovy.·

You are now part of the electronic sculpture movement.·

Long live our aesthetic.