Hello! I was wondering how to program a stepper motor. I’ve looked through the WpiLib classes, and can’t seem to find one for it. We happen to have one for no apparent reason, and I want to make it do something Is there such a thing as a stepper motor class? I’ve looked at the documentation for this one (the one we have), but it seems reliant on an Arduino or Raspberry Pi library. Any help would be great! Thanks!
While can’t help you program the motor, I can help you by reminding you that a stepper motor is not one of the motors legal under [R32].
(If you’re (somewhat desperately) wondering whether it counts as a servo, it doesn’t. The manufacturer’s name for the part is the decider.)
You’re somewhat unlikely to run a stepper with an FRC control system. If you really really wanted to, you’d need to wire two speed controllers up to the stepper and then come up with a class that would cycle the speed controllers through a step cycle on command etc, etc. It’s really not worth it.
Okay thanks! It was for an off-season project, but it’s not that important. We can just use a servo motor At least there’s a class for it.
It should also be possible to get a dedicated stepper controller and control it via DIO pins, much like we do with the parallel port of a PC.