So i brought a motor shield on amazon. It is exactly like the Motor shield v1 from Adafruit. I am trying to run some code I have found online but it isn't working. How could i get it working
#include <AFMotor.h>
AF_DCMotor motor(4, MOTOR34_64KHZ); // define motor on channel 1 with 64KHz PWM (The problem)
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);
}
I am getting this error message: 'MOTOR34_64KHZ' was not declared in this scope
Any help will be much appreciated