I am trying to connect a stepper motor ( this model exactly https://create.arduino.cc/projecthub/trduunze/grove-starter-kit-for-arduino-stepper-motor-driver-66471d ) in an arduino 101 but it does not work for some reason. I have tried connecting everything ast they tell in the website with no results:
And then I tried connecting directly to the board without using the shield, and still getting nothing.
The code I am using is this :
#include <Stepper.h>
int t =0;
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
int stepCount = 0; // number of steps the motor has taken
void setup() {
Serial.begin(9600);
}
void loop() {
// set the motor speed:
int motorSpeed = 15;
if (motorSpeed > 0) {
myStepper.setSpeed(motorSpeed);
// step 1/100 of a revolution:
myStepper.step(stepsPerRevolution / 25);
Serial.println(motorSpeed);//print how fast the motor is going in the serial monitor
}
}
Connecting the stepper motor and the driver, and launching the sketch in an arduino UNO board works perfectly, so I am really worried about that maybe the Stepper.h library might be different for the Arduino 101 but I couldn't find anything about that. I just have no idea why the project is not working in the 101 but working perfectly in the UNO. Any help or tips would be highly appreciated.
Cheers!
EDIT
After a lot of messing around, I have only been able to light up one led in the controller connecting one of the motor cables to GPIO5. None of the other GPIOS seem to work with the step motor controller.