The first lab was to set up a motor running off it's own power with a TIP120 transistor. The potentiometer controls the motors speed by having the microcontroller pulse the transistor. The 9v battery is plugged into a 5v voltage regulator, which powers the motor. The arduino is powered by the USB.
The second lab involved setting up an H-bridge IC with the motor. The switch toggles between running the motor fowards and backwards.
Monday, June 15, 2009
Sunday, June 7, 2009
Serial Duplex
In this lab, multiple sensor values are sent to the computer via serial. A Processing sketch listens to the port and interperets the data, first separating the three sensor values, then reading the two analog values (potentiometers) as x and y coordinates for a circle and the one digital (button) value as whether or not to display the circle
(switching it from black to white)
The board:
The board and Processing sketch (note my hand pressing the button in the bottom left):
For my own interface, I sent serial data from a photoresistor reading to control the red and green values of a point light illuminating a sphere in Processing's 3d renderer:
(Note the position of my hand, blocking the photoresistor's light. As the photoresistor is put in darkness, the orange light on the blue sphere brightens.)
The board:
(switching it from black to white)
The board:
The board and Processing sketch (note my hand pressing the button in the bottom left):
For my own interface, I sent serial data from a photoresistor reading to control the red and green values of a point light illuminating a sphere in Processing's 3d renderer:
(Note the position of my hand, blocking the photoresistor's light. As the photoresistor is put in darkness, the orange light on the blue sphere brightens.)
The board:
Serial Output
Thursday, June 4, 2009
Analog I/O Labs
Sorry about the delay putting these up, I had to wait to get a computer with an SD card reader. Luckily my laptop finally came back from the shop yesterday so I'll never have this problem again.
Analog input: The number of lights lit goes up as you bend the sensor. (I also did this with a photocell which was pretty cool, but I didnt take a picture)
Analog output (Servo Lab) : The servomotor/flex sensor combo is pretty weird; it's strange to have something move precisely with you as you push something else.
Analog input: The number of lights lit goes up as you bend the sensor. (I also did this with a photocell which was pretty cool, but I didnt take a picture)
Analog output (Servo Lab) : The servomotor/flex sensor combo is pretty weird; it's strange to have something move precisely with you as you push something else.
Subscribe to:
Posts (Atom)