Pages: [1]   Go Down
Author Topic: {annoying} Christmas lights  (Read 1125 times)
0 Members and 1 Guest are viewing this topic.
Newcastle, England
Offline Offline
Sr. Member
****
Karma: 3
Posts: 489
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all!
Earlier on today I chucked together an annoying christmas lights flasher.
I posted the details in a thread started a while ago and then realised it was
in frequently asked questions. So here it is, in a more appropriate place.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1290802813/

was the origional, but to save you the effort of going to it, I will post it
here:


What it is, is a set of bright LED lights connected to the arduino to flash
at random intervals. The code is simple and can be seen below:



int delayVal;
const int ledpin = 2;

void setup(){
  pinMode(ledpin, OUTPUT);
}

void loop(){
  randomSeed(analogRead(A0));
  delayVal = random(15, 500);
  digitalWrite(ledpin, HIGH);
  delay(delayVal);
  delayVal = random(15, 500);
  digitalWrite(ledpin, LOW);
  delay(delayVal);
}



a video can be seen here:

or a picture here:
http://i.imgur.com/HpDob.jpg


It is simple, but useless. Hopefully by posting it here someone can make
some use of it, or modify it to improve an existing project.

Thanks,
Onions
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 3
Posts: 489
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The picture is bad quality as it is from a bad camera.
The LED lights were from a garden center last year.
They are driven from a transistor attatched to pin 2 and 3v3.

Hopefully this covered everything I forgot to add in the last post.
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Pages: [1]   Go Up
Jump to: