Description:
When I think of rotation, the though of the Spirograph isn't too far behind. I wanted to create something that involved spinning and drawing. When I realized it's be hard to mount a compass onto the motor, I decided to reverse the process, spinning the paper instead of the compass. A business card is put on the motor (because I have about 1000 business cards I no longer have use for), and when the pen is held, the motor spins turning the paper at high speed. Holding the pen stationary on the paper creates circle. Moving the pen makes concentric circles, changing the colors makes pretty-ish things.
Materials:
Code:
note: same as original code that controlled the potentiometer
int fsrPin = 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(fsrPin); // read the value from the sensor, between 0 - 1024
Serial.println(val);
analogWrite(motorPin, val/4); // analogWrite can be between 0-255
}