Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Hack Your Holiday Decorations

samzenpus posted more than 2 years ago | from the rudolph-the-laser-nased-reindeer dept.

Christmas Cheer 48

jfruhlinger writes "Tired of your code only executing in digital space? Why not hack your smiling snowman? OK, this crash course only shows you how to make pretty LED lights blink in a sequence of your choosing, but it serves to introduce you to Arduino, an open-source platform that uses C-like code. Really, any project that involves a soldering iron is good fun."

cancel ×


Sorry! There are no comments related to the filter you selected.

rehashed hashed hash (0)

mirix (1649853) | more than 2 years ago | (#38454960)

I don't know how many arduino LED blinking stories are out there, but there is definitely too many.

I read the first page and it reads like an ad for the overpriced adafruit outfit. no thanks.

Re:rehashed hashed hash (1)

flaming error (1041742) | more than 2 years ago | (#38455050)

the overpriced adafruit outfit

As a fellow PDP-11 user, you may be unaware that currently fruit is in fashion, and that since 1913 the value of the dollar has dropped 96%.

Re:rehashed hashed hash (1)

c00rdb (945666) | about 2 years ago | (#38459372)

A 1913 dollar bill is probably worth a lot these days

Re:rehashed hashed hash (1)

Samantha Wright (1324923) | more than 2 years ago | (#38455174)

Look on the bright side: with all of those LEDs in the tie[1], you might be able to get away with syncing it to Die Roboter[2].

[1] TFA, p. 3 [] .
[2] Kraftwerk, 1977 [] .

use a 555 and a shift register (5, Insightful)

Osgeld (1900440) | more than 2 years ago | (#38455034)

save 30 bucks ....

I love my arduino, its a great introduction to microcontrollers, but really? Front page of slashdot is "blink a led"? Maybe the story after this one can be "install ram in your PC"

Your fault (0)

Anonymous Coward | more than 2 years ago | (#38455808)

Slashdotters block normal ads, so the stories become the ads. Slashvertisments.
How else do you expect them to "monetize" you?

Re:use a 555 and a shift register (1)

skids (119237) | more than 2 years ago | (#38455824)

Use a UEIC remote control, which are emminently hackable and can be had for half the price of an arduino uno. Of course, then you have to have/make a JP1.3 cable and you don't get to work in C-like syntax... but you do get something already set up to run on batteries.

Re:use a 555 and a shift register (-1)

Anonymous Coward | more than 2 years ago | (#38456016)

Maybe the story after this one can be "install ram in your PC"

Or sheep, or horses, or any four-legged mammal, really. Or maybe you could just submit a better story? Nah, didn't think so...

Re:use a 555 and a shift register (0)

Anonymous Coward | more than 2 years ago | (#38456032)

Does it count if you do it on a breadboard?

Re:use a 555 and a shift register (1)

Osgeld (1900440) | more than 2 years ago | (#38456304)

yes I like that ible

Re:use a 555 and a shift register (4, Informative)

rasmusbr (2186518) | more than 2 years ago | (#38456364)

The summary sucks.

It's actually a singing, blinking snowman that goes off when you come close. And the LEDs are animated by the sound signal strength, so it's blinking along to whichever tune you have stored on the SD card...

Looks like a fun project for a beginner.

Re:use a 555 and a shift register (2)

Osgeld (1900440) | more than 2 years ago | (#38456408)

lol go figure the summary sucks

Re:use a 555 and a shift register (4, Insightful)

thegarbz (1787294) | more than 2 years ago | (#38457258)

Even if you take the lame arse summary at face value the whole point of the summary was to put your PROGRAMMING skills into hacking electronics.

As an EE I fully agree with you about the 555, except I'd implement blinking lights using a bistable multivibrator. However this board is absolutely loaded with people who have no idea what any of the above are, don't have a clue about transistor logic, and definitely don't know their way around analogue electronics.

Write a post like this on hackaday or make, and you should expect the flaming you are getting, but if you're trying to entire programmers then this would be a great way to get them to dip in their toes.

Some computer systems engineers are EEs, others are Software Engineers. Both have to start somewhere.

Re:use a 555 and a shift register (0)

Anonymous Coward | about 2 years ago | (#38459044)

This is true. I've been a software nerd for..well, sicne I was 12, put it that way. But only just got into hardware via arduino. And let's face it, this is good geeky stuff. As it happens, I've got a little arduino-controlled menorah flickering away on my desk even as I type. I'll be poking through this tutorial, looking for cool ideas.

Maybe one day I'll slap a 555 and/or a multi-vibratey-whatsamahoochie together adn do it that way. But this is how we get started. And it's cool.

(that being said, man I wish we had these when I was a kid...)

Re:use a 555 and a shift register (1)

Kamiza Ikioi (893310) | about 2 years ago | (#38461238)

As an EE I fully agree with you about the 555, except I'd implement blinking lights using a bistable multivibrator.

I bought a bistable multivibrator for Christmas one year. Big mistake. I don't think getting the blinking lights model would go over with her family any better, either.

Re:use a 555 and a shift register (3, Insightful)

XxtraLarGe (551297) | about 2 years ago | (#38458558)

That's great, if you know what a 555 and a shift register are. We're not all engineers. Like you said, "it's a great introduction to microcontrollers." This might be the type of project that a lot of us who were not previously interested in Arduino to get started.

Re:use a 555 and a shift register (1)

Osgeld (1900440) | about 2 years ago | (#38465642)

"if you know what a 555 and a shift register are. We're not all engineers"

that amused me to no end, back in the day when people knew how to do stuff for themselves, there was this store called radio shack loaded with electronic goodies ... I hear they still exist but every time I step in one I enter a portal to a celphone kiosk at the mall, anyway for a buck you could get this little book written for 12 year old's that had dozens of 555 timer projects in simple terms

my how times change

Re:use a 555 and a shift register (1)

g0bshiTe (596213) | about 2 years ago | (#38459672)

Attach a battery terminal to one prong of an led, attach the other terminal to a resistor, attach the resistor to the unused prong of the led, you now have a flashing led.

Re:use a 555 and a shift register (0)

Anonymous Coward | about 2 years ago | (#38461470)

You forgot a few steps:

1: Attach a battery termina; to one prong of an LED
2: Attach the other terminal to a resistor
3: Attach the resistor to the unused prong of the LED

Note: LED may now be ON.[1]

4: Dis-connect resistor attached in step 3

Note: LED is now OFF

5: Goto step 3

YOU now have a flashing LED.

If LED is not ON, reverse the battery connections

Funny thing, this looks like the Arduino code.

Amazing Capability (2, Informative)

Anonymous Coward | more than 2 years ago | (#38455070)

Flashing LEDs are frequently the "application" cited for Arduino. But it is FAR more capable than that. For instance, Arduinos are used as the processor for the Arducopter [] autopilot system for multirotor remote controlled aircraft.

Arduino also powers most RepRap 3D printers (4, Interesting)

Morgaine (4316) | more than 2 years ago | (#38457136)

Here's the RAMPS "shield" (Arduino daughterboard) that plugs into an Arduino MEGA microcontroller board to drive the various stepper motors of the printer -- [] , [] .

If you look carefully, the Arduino is the blue board underneath the green RAMPS board in this picture of an assembled RepRap -- [] .

There are cheaper AVR microcontroller boards that'll do the job of controlling a 3D printer, but the Arduino is by far and away the most popular.

I did a lazy hack this year... (4, Funny)

Kenja (541830) | more than 2 years ago | (#38455108)

I just soldered a bunch of three color blinking LEDs to some watch batteries and threw them at my tree. Actually turned out rather nice.

Re:I did a lazy hack this year... (0)

Anonymous Coward | more than 2 years ago | (#38455526)

Pic or didn't happend.

Re:I did a lazy hack this year... (1)

Kenja (541830) | more than 2 years ago | (#38455580)

A picture would require not being lazy. So it will just have to be a non-collapsed wave form, Schrödinger's xmas lights if you will.

Re:I did a lazy hack this year... (0)

Anonymous Coward | about 2 years ago | (#38457846)

It was really a trick question. As you said, you are lazy. Had you produced the pics, we would have known you were a fake, not lazy at all. "Pics and it didn't happen", you could say. You dodged that. You're the real deal, or fiendishly clever. More tests will be administered out of the blue. Maybe today, maybe tomorrow, maybe in a year or three. Keep passing our tests and you will be granted access to an exclusive elite club of lazy, if we get around to starting it.

slashvertisement - get fucked, (-1)

Anonymous Coward | more than 2 years ago | (#38455548)

Eat a dicke!

Honestly (0)

Anonymous Coward | more than 2 years ago | (#38455802)

after following all the advice i can look up, I have yet to even correctly solder two wires together properly. Soldering is not fun, it, in a word sucks, even more when de-soldering.

Re:Honestly (2)

wierd_w (1375923) | more than 2 years ago | (#38455944)

I have the same trouble. Soldering can look so easy when others do it, but years af abusing my wrists doing computer work has given me a nasty combination of carpel tunnel like weakness, and occult gangaleon cysts.

Handling the damn iron is a feat of dexterity I just don't have the patience for.

This is really sad, because I have my eyes set on a project that will require some soldering. :(

What I have decided I will do, is solder some terminal junction blocks down on the pcboard, then just mechanically bite wires, rather than deal with soldering and desoldering.

I don't care if it is less efficient, bigger, and eats more power. You try soldering when your hands shake more than christina agulera on talent night, because the tendons are fucked up.

Socketed or shit ain't happenin.

Re:Honestly (1)

sp0tter (1456139) | more than 2 years ago | (#38456816)

hang in there! It is a skill that must be maintained. One thing I practice on particularly difficult jobs is careful breathing. Of course you dont want to breath in the fumes, but try to exhale slowly as you apply the heat.

Not "C-Like" (4, Insightful)

Anonymous Coward | more than 2 years ago | (#38456086)

Its C. Its compiled by avr-gcc. The Arduino SDK links in a main routine for you and defines a library of standard routines and Macros. Again, not is C.

Re:Not "C-Like" (2)

Osgeld (1900440) | more than 2 years ago | (#38456418)

mod parent up!

so many people think its something else, but the arduino style of progamming is EXACTLY like the parent states, and nothing really stops you from dropping avrgcc functions or asm in the mix

If you use broadband and think slashdot is fascist (-1)

Anonymous Coward | more than 2 years ago | (#38456406)

then make sure after you log out to post a comment that you change your Router or PC mac address and then unplug the cable/dsl/fibre modem for 3-5 seconds and plug it back in. This should change your IP address unless it is static. In which case use a good proxy because the popular vote here is akin to fascism. Too many douchebags saying the law is right.

Arduino to make LEDs blink? really? (0)

Anonymous Coward | more than 2 years ago | (#38456490)

All you need is a 555 timer and two resistors and cap of your choice to control the timing sequence. And two AA batteries.

I've had networked RGB xmas lights since 2k5 :) (4, Interesting)

Miamicanes (730264) | more than 2 years ago | (#38456702)

Pure geekgasm, I present my Christmas tree as posted to Youtube 3 years ago (I haven't had time to do a new video since then, but the lights still entertain me and my guests; view my Youtube channel, and you can find the old version of the video and the rough draft of the next year's) -- []

Note: the website mentioned at the beginning of the video expired last year, so don't try going there. It's probably a trojan-filled pr0n site by now.

Technical specs: each light has an Atmel ATTiny25 with RGB LED, resistors, decoupling capacitor, and 5v linear buck regulator so I can power the string with 13.6v. The string has 3 wires: Vcc, Ground, and serial. The light modules have their own interpreted language that includes things like "fade to $color at $rate, then (stall/pause a while/pause briefly/continue)" and row-column addressing (so I can apply an opcode to every light in a row, every light in a column, a single light, or all lights on the tree). The serial bus itself is actually quite slow (~300bps), with most commands requiring 2 or 3 bytes. The complicated effects were created by writing commands into SRAM, then stepping through them globally so everything sync'ed up.

Total cost of the string you see on the tree: about $1,200 worth of parts, plus the better part of 3 or 4 months soldering and assembling them. The circuit itself, and the onboard firmware, evolved over 3 years. The song in the video took me about 3 weeks to do, and occupied pretty much all of my free time for most of December. The controller itself is a laptop conected through a USB-serial interface to a controller box I made that bitbangs the string's actual serial protocol. The control app is written in Java.

Just to make sure you have this straight:

Java app running on laptop sends opcodes like "Write this value into address $x", or "fade quickly to color #7 and stall", or "set program counter to address 63 and stall", or "begin executing code at current program counter address", for module $y (or all modules in row $y, or all modules in column $y, or all modules) to controller box.

Controller box bitbangs 9-27 bit datagram. Each "byte" is 9 bits, with MSB flagging the last byte. One byte is address (192 possible lights, 7 rows, 8 columns, one value that means "everything")

Modules receive opcodes, and act upon them. Meanwhile, the module itself is executing opcodes already written to SRAM or stored in flash. Note that these are opcodes *I* defined, not Atmel assembly-language opcodes.

The faceted diffusers actually came from a few sets of LED lights I bought at Lowe's, removed, and squeezed onto the (slightly filed-down) ends of the circuit board for each light, with the module itself protected by black heatshrink tubing.

Major design lesson I learned from this project: never, ever depend upon being able to clamp a programming clip onto a SOIC IC. Put real testpoints on the board. SOIC clips suck, they're a pain to clip on, and aren't terribly reliable (about 1/3 of the chips had to be flashed multiple times before it completed writing without errors).

If someone like Atmel were to condense my design down to a hunk of silicon with an ATtiny25 driving three RGB elements and make a "smart LED" with 3 leads (Vcc and Gnd, reversed to put it in "programming" mode, plus a third pin to use for unidirectional serial or bidirectional 1wire, programmed with a protocol like Atmel's debugwire), and each LED were 9v-tolerant with onboard regulator, a string of these lights could probably be manufactured for about 70c per light commercially.

Re:I've had networked RGB xmas lights since 2k5 :) (1)

falzer (224563) | more than 2 years ago | (#38457184)

I did something similar around the same year.
I made a string of many (56 if I remember correctly) blue LEDs, each individually addressable and PWM dimmable, multiplexed thru an ethernet cable + 1 extra wire, all running off one atmega8 and a handful of 2n3906 / 2n3904s.
No PC interface though, just had little programs written for the microcontroller.

Re:I've had networked RGB xmas lights since 2k5 :) (1)

falzer (224563) | more than 2 years ago | (#38457210)

Actually it must have been 36 LEDs now that I think about it.

Re:I've had networked RGB xmas lights since 2k5 :) (0)

Anonymous Coward | about 2 years ago | (#38458520)

Hope you didn't use PWM for dimming your RGB LED's or you would be in violation of Color Kinetics (Philips) patent. Sounds crazy but it's sadly true.

I made a PIC micro controller RGB light show using PWM for my PC case mod back in 2003 before the patent but didn't think about publicly disclosing or patenting the idea. Guess I wasn't as smart as CK was 2 years later.

Re:I've had networked RGB xmas lights since 2k5 :) (1)

TheLink (130905) | about 2 years ago | (#38459298)

Uh PWM must have been used for controlling effective magnitude of "whatever" for decades.

Re:I've had networked RGB xmas lights since 2k5 :) (1)

Miamicanes (730264) | about 2 years ago | (#38459850)

The patent he's referring to is almost the poster child for everything that's wrong with America's patent system. It was granted at the point when the patent office officially disregarded prior art that wasn't itself patented, and the main "innovation" (PWM-wise) was the addition of a blue LED to the red and green one -- something endlessly discussed on Usenet for years, but not physically practical until blue LEDs became commercially-available for the first time in the late 90s.

Nobody seriously believes it would ever survive a real challenge in court, but due to the way America's patent system works, it'll probably never get invalidated before it expires on its own.

The biggest single meaningful reform we could get to the patent system would be to allow a group of self-selected stakeholders to collectively gang up on a patent holder and share the cost of a proactive lawsuit to get it overturned & invalidated, or at least a rule that if you sue somebody for infringement, THEY can force you to pursue the lawsuit to its final judgment (so you can't just drop the suit and risk having your ability to sue OTHERS invalidated if things start going badly), and if the patent holder gets a case dismissed with prejudice against them, apply the same prejudice to all future lawsuits regarding the same patent.

This would raise the stakes enormously, and force patent holders to pick and choose their battles carefully. One ill-conceived lawsuit against an independently-wealthy (or legally-trained & willing to make it his personal crusade pro-se) Aspie determined to teach "you" (the hypothetical patent troll, not the poster above) a lesson, and your patent could get flushed down the toilet over a $10,000 shakedown attempt against someone who's practically judgment-proof compared to the patent's theoretical value. Big companies would still play chess with each other, but empowering "small fry" to say, "no, I'm not going to ALLOW you to just drop the issue and go home with your ball. You picked the fight, and now I'm going to beat you to a pulp fair & square" would raise the stakes considerably and make life for patent trolls a lot more difficult.

"Elf on the Shelf" webcam (2)

Animats (122034) | more than 2 years ago | (#38457174)

Someone needs to build an "Elf on the Shelf" webcam.

"He sees you when you're sleeping. He knows when your're awake. He knows if you've been bad or good..."

Re:"Elf on the Shelf" webcam (2)

SeaFox (739806) | about 2 years ago | (#38458184)

Moderate: +1, Creepy.

Any project involving a soldering iron? Really? (-1)

Anonymous Coward | about 2 years ago | (#38457794)

"Really, any project that involves a soldering iron is good fun."

Maybe you haven't heard of "project-stick-a-soldering-iron-in-submitters-ear"?

Highest-demand xmas hack (1)

dmatos (232892) | about 2 years ago | (#38459436)

Would someone _please_ make full-wave rectifiers for all of those damn LED xmas lights? The 60Hz flicker in my peripheral vision is almost painful to watch. C'mon, manufacturers, we're talking about 5 cents worth of components here.

This is about light art as well (2)

mallyn (136041) | about 2 years ago | (#38459922)


This is not just about Arduino

You may be tired of hearing about Arduino, but this is also about a field called light art or LED art.

I happen to be a devout light artist. I have been playing with light a a means of art long before Arduino came into existence.

If you want to see samples of light art, I have a journal on line at that shows some of my work.

For those of you in the Portland, Oregon area, I am the person you see out and about wearing lighted clear plastic raincoats and lighted jewelry.

Arduinos are nice, but limited (1)

Opportunist (166417) | about 2 years ago | (#38462108)

Seriously. They're fun toys for people with little to no intention to actually get into the "depths" of MC programming. They offer a fairly affordable and easy to use platform, but if you're in any way seriously considering doing more than just blinking some LEDs or driving some servos, you're in for a rather frustrating experience. The platform quickly hits its ceiling.

First of all, that protoboard is huge, compared with the usual spacial requirements of MCs. For me, at least half of the fun in MCs is to make it tiny. TINY. When it fits on my fingernail, I'm getting where I want to go. The bootloader also eats up a fair lot of the available space, and that's rather little to begin with. Plus, AVR isn't the most complicated platform anyway.

Don't get me wrong, I started with Arduinos myself, and they're probably a cool toy for kids to introduce them to the world of MCs. I'd highly recommend getting your kid one, they give them a fairly gentle learning curve and quite a few addons that you may or may not want to buy to add them to the toy, but in the end, that's pretty much where you end. It's a toy. Using it to develop anything more "serious" is pretty much out of the question.

Personally, getting a programmer, a breadboard and a few bits and pieces were a lot more fun, at least to me. Not to mention cheaper. But I'm the kind of guy that's more interested in the "making" of something, not really the end result. Once it's done, it gets boring.

And Arduinos give you the "done" rather quickly. :)

So yes, they're great for quick and small projects, especially when you're more interested in the finished product than the "I built this" experience.

My Project (1)

bradgoodman (964302) | about 2 years ago | (#38462826)

I did a major project like this at my house a few years back. Did a whole xmas light display with Linux, PIC, ethernet, etc. Still have it running [seasonally] to this day!!

Please feel free to check it out (along with design notes, videos, schematics, code, etc, at) []

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?