it needs the namespace.
compiles, but untested:
#include <AccelStepper.h>
#define MAX_SPEED 500
// Class for each finger
class Finger {
public:
// Constructor for each finger object
Finger(int stepPin, int dirPin) :
stepper(AccelStepper::DRIVER, stepPin, dirPin)
{
stepper.setMaxSpeed(MAX_SPEED); // are you sure this is a good idea in the constructor?
}
AccelStepper stepper;
};
Finger Thumb(2, 3);
void setup() {
}
void loop() {
//Example of how I want to use the stepper finger class
Thumb.stepper.moveTo(90);
}