For this lab, we used a DC gearhead motor and an H-bridge to control the direction of the motor. This lab was the first in which we used an external IC but since Charlie and I already had some experience working with Xbee's, we setup the Arduino to work with the chip with relative ease. Here are two photos of the board and little movie of the motor spinning and changing direction when I pressed the switch.
For the creative part of the lab, Charlie and I were trying to brainstorm ideas of what to do with the motor. We thought of making a fancy clock, a conveyer belt, and a car. We decided to try and make a car out of junk we found in the lab. I'd say we were pretty resourceful but couldn't quite nail the drive train.
This lab proved to be the most trying in terms of getting it all to work properly. It was also the first lab I worked on with other class members which was a nice change. Fortunately for us, the issues were easily resolved with the help of the resident researchers. My first problem was that I couldn't get Terminal to communicate with my Arduino. It turned out that I had left out the word "screen" when prompting the Terminal to find a serial port. The next snag was getting Processing to communicate with the Arduino. After a web search, Charley found that in Mac OSX, a Terminal command was needed to get access to the serial ports. After that we got the program to run as intended and started to change parameters in the code.
After some fun moving the ball around in the box, I thought that it would be neat if the ball could draw. Charley, having taken a class about Processing, fiddled with the code so that the ball would draw. Lucia then added to the code so that the ball had further range of motion and then I adjusted the size of the ball as well as the size of the drawing space to compensate for the potentiometer range. When we initially wrote the code, we were using a pot and a photoresistor. I decided that the photocell didn't give enough precision when drawing so I swapped it out for another pot. Knowing that this week's topic was enclosures, I whipped up a little box to hold the breadboard and attached some knobs on the pots so that the controls would be easier.