Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Christmas Cheer Hardware

Hack Your Holiday Decorations 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."
This discussion has been archived. No new comments can be posted.

Hack Your Holiday Decorations

Comments Filter:
  • 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.

    • 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%.

    • 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 [itworld.com].
      [2] Kraftwerk, 1977 [youtube.com].
  • by Osgeld ( 1900440 ) on Wednesday December 21, 2011 @07:13PM (#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"

    • by skids ( 119237 )

      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.

    • by rasmusbr ( 2186518 ) on Wednesday December 21, 2011 @11:15PM (#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.

    • by thegarbz ( 1787294 ) on Thursday December 22, 2011 @03:01AM (#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.

      • 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.

    • by XxtraLarGe ( 551297 ) on Thursday December 22, 2011 @08:27AM (#38458558) Journal
      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.
      • by Osgeld ( 1900440 )

        "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

    • 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.
  • Amazing Capability (Score:2, Informative)

    by Anonymous Coward

    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 [google.com] autopilot system for multirotor remote controlled aircraft.

  • by Kenja ( 541830 ) on Wednesday December 21, 2011 @07:22PM (#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.
  • Not "C-Like" (Score:4, Insightful)

    by Anonymous Coward on Wednesday December 21, 2011 @10:22PM (#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 C-Like...it is C.

    • by Osgeld ( 1900440 )

      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

  • by Miamicanes ( 730264 ) on Thursday December 22, 2011 @12:27AM (#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) -- http://www.youtube.com/watch?v=U5qR9_8KGPU [youtube.com]

    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.

    • by falzer ( 224563 )

      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.

  • by Animats ( 122034 ) on Thursday December 22, 2011 @02:41AM (#38457174) Homepage

    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..."

  • 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.

  • Folks:

    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 www.allyn.com 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 ligh

  • I want to learn to make my Christmas decoration do this. http://www.youtube.com/watch?v=0-ANLNPBtVY [youtube.com]
  • 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 m

  • 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)

    http://www.bradgoodman.com/dimwatt [bradgoodman.com]

Keep up the good work! But please don't ask me to help.

Working...