Electronics and Software - Can't Do This Anymore

The electronics and software for the build were relatively straightforward, as we just needed to rotate a motor at a fixed speed in one direction continuously.

Electronics:

  • We used a motor shield connected to an Arduino Uno to drive the single DC motor (the same setup from the first build)
  • We also incorporated an on/off switch to prevent us from having to plug and unplug the power cable to test

Software:

(Basic Motor Control With the Arduino Motor Shield)

//RMD Final Project Code
//Victor, Abhi, David
void setup() {
  Serial.begin(9600);
  pinMode(12, OUTPUT); //Initiates Motor Channel A pin
  pinMode(9, OUTPUT); // Channel A Brake pin
}

void loop() {
  digitalWrite(12, LOW); //Reverse direction
  digitalWrite(9, LOW);   
  analogWrite(3, 255); //Run motor at full speed
}