Hey all,
I’ve been trying to troubleshoot an interesting issue regarding driving a stepper using the accelstepper library on the Photon vs Electron. I’m working on a device that should be able to use either dev board, and I’ve noticed some very significant speed differences where the Electron will drive a motor much, much more slowly compared to the Photon, using identical speed settings. The electron also seems to “max out” at a speed that is way too slow even if I manually increase the speed value.
This is a (very) simplified version of my code that I have flashed to both Photon and Electron, I am using the Pololu A4988 stepper driver:
AccelStepper myStepper(1, D0, D1); // “1” represents “DRIVER” mode
myStepper.setSpeed(1000);
void loop(){
myStepper.runSpeed();
}
Not sure where this issue is coming from. Any help would be greatly appreciated! Also would be happy to provide more detail if necessary.
Thanks!