Announcements

November 24, 2007
Reading for November 27th, are now posted. Enjoy!

October 2, 2007
To upload your thoughtless acts, create a new assignment page like any other lab. You'll see "Thoughtless Acts" listed as one of the assignment options.

May 24, 2008
This site has been archived and is no longer editable. Stay tuned for the next version, coming in the fall!


Revision of Lab 6 - Phenakistoscope from Thu, 10/11/2007 - 00:44

Project Members: 
Isaac Salier-He...

Description

Using input from a potentiometer to control rotational speed and a DC motor to perform rotations, this project is a rudimentary phenakistoscope (even though all phenakistoscopes are pretty rudimentary). For more information on these things, check out wikipedia: http://en.wikipedia.org/wiki/Phenakistoscope

By rotating a disc with a series of drawings and slits for viewing, it is possible to view a brief animation by holding the rotating disc up to a mirror and looking through the slits as they spin past.

A couple problems I encountered in putting this together: 1) I'm a terrible animator, apparently -- my poor little stick man didn't quite do what I wanted him to do, and instead he's doing a little jig, and 2) the motor spins the wheel a bit too fast for good viewing, even on the lowest levels.

Components

  • breadboard
  • 1 1k Ohm resistor
  • 1 diode
  • 1 transistor
  • 1 DC motor
  • 1 battery pack with 2 AA batteries
  • 1 potentiometer
  • wires
  • Arduino board
  • phenakistoscope wheel with animation images
  • mirror for viewing
  • rubber bands

Code

I didn't need to make any modifications to the code provided for the 4 October lab. I've pasted it below.

/*
* one pot fades one motor
* modified version of AnalogInput
* by DojoDave <http://www.0j0.org>
* http://www.arduino.cc/en/Tutorial/AnalogInput
* Modified again by dave
*/

int potPin = 0; // select the input pin for the potentiometer
int motorPin = 9; // select the pin for the Motor
int val = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop() {
val = analogRead(potPin); // read the value from the sensor, between 0 - 1024
Serial.println(val);
analogWrite(motorPin, val/4); // analogWrite can be between 0-255
}

Photo and Video

Flickr: http://www.flickr.com/photos/46877131@N00/1540748908/

YouTube: http://www.youtube.com/v/GeDRFVmL1Dw


Powered by Drupal - Design by Artinet