top of page

Motor Control with Arduino and Adafruit Motor Shield


SOURCE CODE:

#include <AFMotor.h> //include motor shield library AF_DCMotor motor(1); // set motor to motor pin 1

void setup() { motor.setSpeed(100);//turn on motor motor.run(RELEASE);

}

void loop() { motor.run(FORWARD);//move the motor forwards delay(3000); //delay 3 seconds motor.run(BACKWARD);//move the motor backwards delay(3000);//delay 3 seconds

}


Single post: Blog_Single_Post_Widget

Address

Fanwood, NJ 07023, USA

Contact

©2017 by Robotic Nation. Proudly created with Wix.com

bottom of page