Hi,
I am trying to get a stepper motor and flashing light to work with Bluetooth, but I can't get it all to work together properly.
I can get just the motor and light to work together, with the motor rotating correctly.
I can also get the flashing light and Bluetooth to work together, BUT when I add the stepper motor to it, it simply vibrates instead of rotating.
There appears to be some incompatibility between the stepper motor and the bluetooth library, but I can seem to figure it out.
If anyone has run into this issue, or can provide some guidance, it would be really appreciated.
Libraries I am using:
#include "Boards.h"
#include <SPI.h>
#include <RBL_nRF8001.h>
#include "iShield.h"
#include <AccelStepper.h>
I've tried commenting out everything but the stepper code to get to a baseline where the stepper code is working. Then I've tried uncommenting bit by bit, to see what introduces the issue, and it appears to be the call to ble_begin();
Anyone out there who can help?
HERE'S THE SAMPLE CODE (uncommenting the ble_begin() statement results in the motor vibrating but not turning):
#include "Boards.h"
#include <SPI.h>
#include <RBL_nRF8001.h>
#include "iShield.h"
iShield myiShield;
#include <AccelStepper.h>
AccelStepper stepper(AccelStepper::FULL4WIRE, 8, 9, 10, 11);
void setup()
{
// Initialize and start BLE library.
// ble_begin();
// Serial.begin(9600);
// ble_set_name((char *)"STEPPER W BLUETOOTH");
stepper.setMaxSpeed(1000);
stepper.setSpeed(300);
}
void loop()
{
stepper.runSpeed();
}