functioning with only one dc motor. The 9v battery, Arduino, and wiring are
located at the top, between the disposable plates. The drawing happens when the
motor spins the mechanism at the bottom. There is a small brush attached at one
side where one can deposit ink so that when it spins, circular marks will are made, but not entirely as some marks are more organic. Material wise, I’ve
pursued a food theme and I even used soy sauce as ink.
void setup()
{
pinMode(motorPin, OUTPUT);
}
void loop()
{
motorOnThenOff();
//motorOnThenOffWithSpeed();
//motorAcceleration();
}
void motorOnThenOff(){
int onTime = 2500;
int offTime = 2000;
digitalWrite(motorPin, HIGH);
delay(onTime);
digitalWrite(motorPin, LOW);
delay(offTime);
}
void motorOnThenOffWithSpeed(){
int onSpeed = 2000;
int onTime = 2500;
int offSpeed = 50000;
int offTime = 1000;
analogWrite(motorPin, onSpeed);
delay(onTime);
analogWrite(motorPin, offSpeed);
delay(offTime);
}
void motorAcceleration(){
int delayTime = 50;
//Accelerates the motor
for(int i = 0; i < 256; i++){
analogWrite(motorPin, i);
delay(delayTime);
}
//Decelerates the motor
for(int i = 255; i >= 0; i–){
analogWrite(motorPin, i);
delay(delayTime);
}
}