Slashdot Mirror


Hack Your Holiday Decorations

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

15 of 48 comments (clear)

  1. use a 555 and a shift register by Osgeld · · Score: 5, Insightful

    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"

    1. Re:use a 555 and a shift register by rasmusbr · · Score: 4, Informative

      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.

    2. Re:use a 555 and a shift register by Osgeld · · Score: 2

      lol go figure the summary sucks

    3. Re:use a 555 and a shift register by thegarbz · · Score: 4, Insightful

      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.

    4. Re:use a 555 and a shift register by XxtraLarGe · · Score: 3, Insightful

      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.

      --
      Taking guns away from the 99% gives the 1% 100% of the power.
  2. Amazing Capability by Anonymous Coward · · Score: 2, Informative

    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.

  3. I did a lazy hack this year... by Kenja · · Score: 4, Funny

    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.

    --

    "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
  4. Re:Honestly by wierd_w · · Score: 2

    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.

  5. Not "C-Like" by Anonymous Coward · · Score: 4, Insightful

    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.

    1. Re:Not "C-Like" by Osgeld · · Score: 2

      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

  6. I've had networked RGB xmas lights since 2k5 :) by Miamicanes · · Score: 4, Interesting

    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

    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.

  7. Arduino also powers most RepRap 3D printers by Morgaine · · Score: 4, Interesting

    Here's the RAMPS "shield" (Arduino daughterboard) that plugs into an Arduino MEGA microcontroller board to drive the various stepper motors of the printer -- http://reprap.org/wiki/Arduino_Mega_Pololu_Shield , http://reprap.org/wiki/RAMPS_1.4 .

    If you look carefully, the Arduino is the blue board underneath the green RAMPS board in this picture of an assembled RepRap -- http://reprap.org/mediawiki/images/4/4a/Assembled-prusa-mendel.jpg .

    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.

    --
    "The question of whether machines can think is no more interesting than [] whether submarines can swim" - Dijkstra
  8. "Elf on the Shelf" webcam by Animats · · Score: 2

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

    1. Re:"Elf on the Shelf" webcam by SeaFox · · Score: 2

      Moderate: +1, Creepy.

  9. This is about light art as well by mallyn · · Score: 2
    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 lighted jewelry.

    --
    Most Respectfully Yours Mark Allyn Bellingham, Washington