Hello there im just inquiring about a error that im getting from a example 7 found in
http://www.schmalzhaus.com/EasyDriver/Examples/EasyDriverExamples.html
im not sure but this is the error im getting:
sketch_feb10b:21: error: 'FULL2WIRE' is not a member of 'AccelStepper'
AccelStepper stepper(AccelStepper::FULL2WIRE, 8, 9);
^
exit status 1
'FULL2WIRE' is not a member of 'AccelStepper'
i assume it must be a BigEasy fix.
also here is the original example for further clarification:
/*
Example 7: Serial command input
Using the exact same hardware setup as Example
1, this sketch illustrates how to use simple
one letter commands from the serial port to
control the direction and speed of the stepper
motor.
Example7 for Brian Schmalz's Easy Driver
We control the direction and speed of a
stepper using the
arduino serial port. Note that (if using
the Serial Monitor)
you will need to press Enter after each
command.
*/
#include <AccelStepper.h>
AccelStepper stepper(AccelStepper::FULL2WIRE, 8, 9);
int spd = 1000; // The current speed in steps/second
int sign = 1; // Either 1, 0 or -1
void setup()
{
Serial.begin(9600);
stepper.setMaxSpeed(1000);
stepper.setSpeed(1000);
}
void loop()
{
char c;
if (Serial.available()) {
c = Serial.read();
if (c == 'f') { // forward
sign = 1;
}
if (c == 'r') { // reverse
sign = -1;
}
if (c == 's') { // stop
sign = 0;
}
if (c == '1') { // super slow
spd = 10;
}
if (c == '2') { // medium
spd = 100;
}
if (c == '3') { // fast
spd = 1000;
}
stepper.setSpeed(sign * spd);
}
stepper.runSpeed();
}