January 2, 2010

Happy 2010! Resolutions & Review

Now that I'm back from Christmas break, I am filled with a newfound resolve! Actually, for the new year I resolved to make my robot army self-aware by November. So I'd better get crackin, eh? Good news is I'm awash with new ideas built up in the hiatus. For example, I heard you can build guitar effects using components commonly found in compact florescent lamps - neat! (see Make: magazine vol 19). I also have a malfunctioning remote car start module with neat still-working radio tranceiver stuff with which I could do interesting things. The makerspace crew here in Urbana are still bringing the space towards fully operational (doors-open day), so there's lots going on there too. But today I decided to focus on a Chrismas present given to me by my daughter: Tom Igoe's book, Making Things Talk. For those not familiar, this book is a practical walk-through guide on creating physical interfaces that can communicate with our arduino or other platforms. It's just what I've been working at, so what a great gift. I decided to use it for some of our future experimentation.

I skipped around a bit in the beginning of the book. Yeah, got tools. Yeah, know what a network server is. Yeah program in PHP. Yeah know what a pulse is. Yeah yeah yeah. I skimmed right to the part where the author mentions some API called Processing which allows us to write some Java-looking programs which will ostensibly help later on? Looked interesting, so I went to processing.org, got the Linux version, installed it, and proceded to write some sample code that takes some mouse inputs and draws some artsy muticolored triangles. I modified the code in the book, and my daughter played with the thing for twenty minutes.  Noteworthy is the fact that processing programs were also called "sketches", which was was the Arduino API program also called its programs. I started Arduino and confirmed that the two were not the same thing (Arduino uses AVR-GCC, not Java), but I thought this was interesting and maybe not coincidental.

Next, the book gave pointers on using CLI, ssh, and nano (nano? really?). After that, more on Arduino, the Arduino API, and some other platforms, such as Wiring (similar to Arduino), using raw AVRs and PICs. It breifly went into basic circuits, and how to pull pins high and low with pull-up and pull-down resistors and switches. Interesting, but we're past that stuff. I skipped along until it delved into serial communications in chapter two. I finally found out what those MISO and MOSI pins from the AVR programming interface (what was that, 2 months ago?) are for - apparently what I didn't get before was the fact that there are two kinds of serial comms. The first one, the one we all know so well, is asynchronous. This is our 2-wire grounded serial. The second is synchronous and requires a master to initiate the connection. The master provides a clock signal (CLK) for and has a chip select line (CS - not sure what this is for though), and the data lines, Master-In, Serial-Out (MISO), and Master-Out, Serial-In (MOSI). That being said, asynchronous should be fine for now. Also learned a bit about the nature of USB, and how we can host multiple serial connections on a bus and sort out all the signals

I wrote some code in the Arduino API that communicated over the USB->serial interface and messed around with it in minicom while blinking an LED, of course. I suppose the first chapter and a half was a good review of everything I've figured out up to now. At least I've some affirmation from several sources that I'm focusing on the right things.

Review time is over. Let's start getting into some project work. In the next couple of weeks, I intend to make the pong-playing stuffed monkey (monski) project in chapter 2, where we abtract the mouse input into a data object and learn about communication flow control. Also, since I've already taken apart a CFL and recovered the neat electronics, I will be making some guitar effects pedals for my rocker girl using the plans in Make: Volume19. Excited? I am. Enough blinky LEDs, time to make! Happy new year!