Stap 6: Arduino Sketch
/* * Chienline -==:: 3 Volts DC Motor Driver with Dual 555 Timer IC ::==- * Control Pin from 555 IC is needed to STOP the motor * Trigger Pin from 555 IC is needed to drive forward or backward * PWM on Trigger Pin is used to set the speed * Note : Forward and Backward is interchangeable via Motor connection. */int controlPin = 2; // 555 pinout 5 int triggerPin = 3; // 555 pinout 2// the setup routine runs once when you press reset:void setup() { pinMode(controlPin, OUTPUT); pinMode(triggerPin, OUTPUT); } // the loop routine runs over and over again forever: void loop() { // move FORWARD; digitalWrite(controlPin, HIGH); digitalWrite(triggerPin, HIGH); //full speed delay(3000); // PWM testing to control motor speed // analogWrite(triggerPin, 128+70); //minimum speed (128+70) // delay(3000);// STOP; digitalWrite(controlPin, LOW); digitalWrite(triggerPin, HIGH); delay(3000);// move BACKWARD; digitalWrite(controlPin, HIGH); digitalWrite(triggerPin, LOW); //full speed delay(3000); // PWM testing to control motor speed// analogWrite(triggerPin, 128-70); //minimum speed (128-70) // delay(3000);// STOP; digitalWrite(controlPin, LOW); digitalWrite(triggerPin, HIGH); delay(3000); }