Go Down

Topic: LED chase project...code advice for noob... (Read 2227 times) previous topic - next topic

ArtieJ

I've done a bit of programming in PHP and some in Javascript so I understand a few basics.
I'm just now finishing up an Ethernet relay control project where I modified some existing code, and everything
worked brilliantly.
So that's where I'm coming from.  Ready to start my first project where I will be writing more of the code
as a learning experience.  I've never done any C or C++ so programming for the Arduino is a challenge.

Project basics:  I want to control 4 channels of multiple LEDs,  with a rotary switch to select only 2 or maybe 3 patterns, and a pot to adjust chase speed.  The main pattern I'm interested in is a "soft dark" chase, meaning one channel  about half brightness at a time, while the other channels are full ON.
So,on a scale of 1 to 10 where 10 is the brightest, a 4-step sequence would be:
STEPS            CHANNELS
                          1          2          3          4       
1                        5         10         10        10
2                       10         5         10        10
3                       10        10        5          10
4                       10        10        10         5       

Other chases may be as simple as an all ON all OFF flashing effect.
From what I understand, I should be able to use digital inputs to select the patterns, an analog input for the speed control,
and I would need to use PWM for the LED dimming.
I'm not looking for a handout, just any info like similar projects you may have done or seen, or basic advice on how to go about it.

Thanks for your time reading this.  The goal is to "pimp out" my Telecaster guitar with some LEDs mounted on a plexiglass overlay that could easily mount to the top of the guitar with velcro fasteners. 

marco_c

You may find something you can use in the MultiBlink sketch in my code repository (link below). This is not beginners code but if you get your head around how it works you will be set for a loot of other projects.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

fungus

#2
Jan 27, 2014, 09:42 am Last Edit: Jan 27, 2014, 09:45 am by fungus Reason: 1
I'd use a WS2811 LED strip for this:

http://www.ebay.com/sch/i.html?_nkw=ws2811+strip

it's RGB color and you can drive as many LEDs as you want with one Arduino pin.
Advanced Arduino

ArtieJ

Thanks Marco, I'll look at your code and see what I can learn from it.
Fungus, I work at a lighting and sound company, I think we have that stuff in stock actually.  Or something like it. I'll check with our retail guy.
I'm not sure using those kind of strips would be aesthetically pleasing, my original idea was mounting standard LEDs on a clear thin plexiglass or acrylic sheet to be less obtrusive.
So far I've got 3 simple chases setup and can trigger the loops with the digital inputs, and have a potentiometer controlling the speed.  Now I'm reading up on PWM.

fungus

I'm not really sure what you mean by the 'top' of the guitar.

Don't confuse WS2811 strips with simple decorative lighting strips. WS2811 strips can be cut up into individual LEDs so you can stick them to things and you can get them with different colored background (black/white). Each LED is individually programmable (there's an RGB PWM controller inside each LED).

I was just thinking that you can do a lot more than simple chases if you have fully programmable LEDs. Maybe even make them respond to the music.
Advanced Arduino

ArtieJ

The front, or face of the guitar...the surface facing the public for all to see.  Teles have a uniformly flat front surface like an acoustic, not arched like many other guitars.
I'll find out what kind of LED strip we have.   All I know is it can be cut to custom lengths, and it is powered by a controller.
It can do any mix of RGB, but I don't think the individual LEDs are addressable so it's probably  not the WS2811.

ArtieJ

Fungus, just saw a vid of a WS2811 pimped out drum set....too cool for school!  Thanks for turning me on to this!

Go Up