Halloween Forum banner

1 - 1 of 1 Posts

·
Registered
Joined
·
67 Posts
Discussion Starter #1
For those of you that know what an arduino board is, here is a code for DIY cave eyes. I had a board that I was not using so I coded it for eyes. There are less expensive DIY alternatives for cave eyes but the instructions are scattered all over the net and hard to piece together…. Guess this is for those of you that have a spare arduino.


http://www.youtube.com/watch?v=QZwipbd_uUM

This code is not mine but I adjusted it for the cave eyes... I left the author's name.





// Example of flashing multiple LEDs at different rates without delays
// Author: Nick Gammon
// Date: 23 December 2012

#include <LedFlasher.h>

// set up some LEDs
LedFlasher eye1 (1, 200, 13300);
LedFlasher eye2 (2, 300, 11700);
LedFlasher eye3 (3, 300, 10000);
LedFlasher eye4 (4, 100, 11000);
LedFlasher eye5 (5, 200, 9800);
LedFlasher eye6 (6, 200, 9000);
LedFlasher eye7 (7, 300, 12400);
LedFlasher eye8 (8, 300, 10300);
LedFlasher eye9 (9, 100, 8400);
LedFlasher eye10 (10, 200, 105
00);


void setup()
{
eye1.begin ();
eye2.begin ();
eye3.begin ();
eye4.begin ();
eye5.begin ();
eye6.begin ();
eye7.begin ();
eye8.begin ();
eye9.begin ();
eye10.begin ();
} // end of setup

void loop()
{
// update lights
eye1.update ();
eye2.update ();
eye3.update ();
eye4.update ();
eye5.update ();
eye6.update ();
eye7.update ();
eye8.update ();
eye9.update ();
eye10.update ();


// do other useful stuff here ...


} // end of loop
 
1 - 1 of 1 Posts
Top