LED effects library

Hi!

I'm new to this forum, but already had my benefits here from code examples, etc. So I think it's time to pay my dues, although I'm not a Lannister.

I recently built an arcade cabinet, and now that it's done, I added some eye candy to it, to make the standard attract mode even more attractive (or annoying... :roll_eyes:)

I installed 16 LEDs around the coin slots, planning to attach some simple running light PCB to them, when the idea of using an Arduino board crossed my mind some days ago.

So, I created a small library (my very first one for the Arduino), which provides functions for certain effects for my 16 LEDs (you are not limited to 16, of course). For example, you can trigger all LEDs on or off in random succession, have two LEDs crossing in the "center" of your LED strip, divide your LED strip into segments, with a running light per segment, etc.

Maybe the library is useful for other folks addicted to LEDs, so I decided to upload the code here, along with a small example program -- I hope I just hit the right section of this forum!

And, even better, (and totally unusual for me), you'll find comments throughout the code! So by taking a look at the sources, one should be able to quickly figure out what's going on in function a or b.

Comments, additions and modifications are highly appreciated!

Enjoy the show,

--Ryzzdorf

P.S. Yes, I'm well aware that "delay()" is hated throughout all known universes, but since "my" Arduino serves exclusively for LED purposes, I guess it's okay to use "delay()". Anyway, the more people complain, the higher the chances I'll upgrade the lib, avoiding "delay()"..... 8)

Arduino LEDEffects Library V0.1.7z (2.92 KB)