PDA

View Full Version : Need a simple Arduino Sketch for Lights


cteagan
11/25/2014, 10:36 PM
So today my Arduino Uno was delivered and tomorrow my DIY LED's will be delivered........I know nothing about programming or writing a sketch.

Does someone have a simple sketch they could send me or post to start as a baseline? I can figure out how to modify the start/stop times, pins for the output and stuff like that. I'd like to be able to get them running that then play around with the sketch to perfect it.

If anyone can help, that would be great.

Thanks

gbru316
12/05/2014, 03:30 PM
There are a lot of example sketches that come with the arduino IDE.

They are all explained here (http://arduino.cc/en/Tutorial/HomePage).

I don't think anyone is going to write a sketch for you because every sketch is application specific. We don't know your hardware or what you intent to do with it. Take the time to learn how to do it yourself, it's a worthwhile endeavor.

Also, without something to keep time, you won't be able to turn the lights on and off at specific times. You'll need a real time clock to do that as the arduino doesn't feature a traditional clock. Using "delay" or "millis" is not a good choice here. The ds1307 is pretty easy to implement and pretty cheap, to boot.