I think something may be wrong with my shield, as I looked at the other forums related to this question and still can not get help.
I know that I can't run it from a 9V source by itself, as the Adafruit website specifically said I can't. So they said to use a LiPo battery or 8 AA batteries. So I tried powering the shield with 8 AA batteries and the light comes on to confirm that.
I then added a 9 volt battery to power the Arduino itself. My motor is a DC motor from RadioShack that can work at 9V, 12V or 18V. I have the motor connected to M2. What am I doing wrong? Here is the site I am following.
Here is the DC motor.
Again, if anyone knows what I am doing wrong, that would be very helpful to know. Thank you for your time and effort.
Edit 1:
#include <AFMotor.h>
AF_DCMotor motor(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
motor.setSpeed(200); // set the speed to 200/255
}
void loop() {
Serial.print("tick");
motor.run(FORWARD); // turn it on going forward
delay(1000);
Serial.print("tock");
motor.run(BACKWARD); // the other way
delay(1000);
Serial.print("tack");
motor.run(RELEASE); // stopped
delay(1000);
}