Hi!
I can't run this program in Arduino software.
i got this error:
https://drive.google.com/file/d/0B6os7RfZ54g0QmlkNHpKVVpUNnc/edit?usp=sharing
Can anyone solve this program error to work this code?
/*
Driving two stepper motors with an Arduino through
Sparkfun's EasyDriver v4.3
By Ben Leduc-Mills and Dustyn Roberts
Created: 2010.06
*/
#include Stepper.h //import stepper library
#define STEPS 200 // 360/1.8 (step angle) = 200 steps/revolution
//declare new stepper objects from stepper library (one per motor)
Stepper right_motor(STEPS, 6, 7); //6=DIR, 7=STEP
Stepper left_motor(STEPS, 11, 12); //11=DIR, 12=STEP
void setup() {
//set motor speeds (in RPM)
right_motor.setSpeed(200);
left_motor.setSpeed(200);
}
void loop() {
//step each motor every time through the loop
right_motor.step(10);
left_motor.step(10);
delay(10); //gives the motor a chance to get to new step
}
Error massage:
sketch_apr27a.ino:7:10: error: #include expects "FILENAME" or
sketch_apr27a:11: error: 'Stepper' does not name a type
sketch_apr27a:12: error: 'Stepper' does not name a type
sketch_apr27a.ino: In function 'void setup()':
sketch_apr27a:16: error: 'right_motor' was not declared in this scope
sketch_apr27a:17: error: 'left_motor' was not declared in this scope
sketch_apr27a.ino: In function 'void loop()':
sketch_apr27a:22: error: 'right_motor' was not declared in this scope
sketch_apr27a:23: error: 'left_motor' was not declared in this scope