10.18.2011

Arduino - Day 1

I ordered an Arduino (Duemilanove) and a starter kit from Amazon. The Arduino came today, but it turns out I never ordered the kit - I just left it in my cart and one-click ordered the Arduino. Anyways the point is I was left with a board but no wires/sensors/actuators/anything to do anything with.

All the Arduino came with is the board itself. (It was prebuilt; I didn't need to assemble/solder it together.) Luckily I have a box of electonic odds and ends to pick through.
First up, I found a USB A to B cable from who knows what - an old printer maybe. This is essential to powering the Arduino and being able to execute code on it.

Then I took apart a cheap headlamp (I think I bought a 3-pack for $10 at Home Depot during the great San Diego blackout of 2011). I was able to salvage 5 white LEDs, a few bits of wire, a momentary switch, and a possibly useful 3xAAA battery harness.


Lastly I found an old cell phone - we're talking an LG clamshell design from 2000 or so.
I've never taken apart this phone before, but I was able to take out the speaker and vibrating motor, identify which was which, and hook them up to an external power source without blowing them up.

I also have a handful of resistors, a few spools of wire, wire cutters, soldering iron and solder, and a multimeter. And who knows what else lying around in the closet that I can dissect tomorrow.

With these scavenged components, here's what I was able to do so far today:
- install Arduino IDE and test the board
- blink a single LED
- 5 LED array that flashes a static pattern (1-2-3-4-5-4-3-2-1-2-3-4-5-4-3-2-1...)
- 5 LED binary counter with button. When you click the button it increments the counter. When you hold the button it resets the counter.
- hook up the speaker and play an 8-bit "shave-and-a-haircut"
- button and speaker: click the button to hear a square wave, release for silence, hold the button to cycle up and down in frequency
- convert an audio file to 8bit 8k PCM unsigned wav, load it on the Arduino, and play it (!!!!)
- hook up the vibrating motor to the switch


These things feel like magic. I love being able to understand the whole process vertically: both the down and dirty electronics and the software. That I can hook up a bunch of wires, write a bunch of numbers to flash memory, press a button that I wired and have recognizeable sound come out of a speaker.... is invigorating.

I already know what big project I want to work towards and that's what is steering my exploration. But at this point, this tinkering process is such a good learning tool. Just today I've learned so much about the Processing language, the Arduino platform, electronics components and theory, and a few mac and unix goodies (ffmpeg conversion, editing and cat'ing a wav header onto a headerless chunk of wav data... ) This is fun :)

1 comments:

Unknown said...

The arduino function to follow the command what ever is place inputs.
Jaycon