Shop OBEX P1 Docs P2 Docs Learn Events
Vegas lights — Parallax Forums

Vegas lights

ERMERM Posts: 34
edited 2009-12-10 02:31 in BASIC Stamp
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

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-10-25 03:44
    So, you mean, like...·this?
  • ERMERM Posts: 34
    edited 2009-10-26 14:53
    Exactly
  • sstone86sstone86 Posts: 19
    edited 2009-10-26 18:00
    That's awesome! Share the source code?
  • dandreaedandreae Posts: 1,375
    edited 2009-10-28 14:46
    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·
  • ERMERM Posts: 34
    edited 2009-10-28 17:51
    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.
  • hover1hover1 Posts: 1,929
    edited 2009-10-28 18:18
    It can all be done in software using Pulse Width Modulation (PWM). Do a search in the forums, there are lots of examples.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-10-29 00:30
    Don't write any articles for Nuts & Volts (that's all I ask), just have fun with it.
  • ERMERM Posts: 34
    edited 2009-10-30 03:40
    Thanks PJ, that's exactly what I was looking for. Very cool.
  • Mike2545Mike2545 Posts: 433
    edited 2009-11-01 00:17
    This is a video of what I did with your code...thanks Mr.Allen

    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
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-11-01 02:27
    ·Far out!
  • Mike2545Mike2545 Posts: 433
    edited 2009-11-01 18:14
    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

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

    This message sent to you on 100% recycled electrons.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-11-01 18:52
    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.)
  • Mike2545Mike2545 Posts: 433
    edited 2009-12-09 03:12
    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

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

    This message sent to you on 100% recycled electrons.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-12-10 02:31
    Groovy.·

    You are now part of the electronic sculpture movement.·

    Long live our aesthetic.
Sign In or Register to comment.