Hi Guys,
I have Problem with my Code and im pretty sure you should be able to help me. Its not really complicated. Im trying to control a stepper motor with the grove speech recognizer and its working so far. My only Problem is that it won't stop turning in one direction once i gave the signal. Here is my code:
#define STEPS 32 // Number of steps per revolution of Internal shaft
int Steps2Take; // 2048 = 1 Revolution
SoftwareSerial softSerial(SOFTSERIAL_RX_PIN,SOFTSERIAL_TX_PIN);
/-----( Declare objects )-----/
// Setup of proper sequencing for Motor Driver Pins
// In1, In2, In3, In4 in the sequence 1-3-2-4
okay thank you very much. I trie it with just setting cmd to another value but it won't work... can u give me a more precise solution? How do i reset the Value?
Hey sry to get on ur nerves again i did it like that: `#include "Stepper.h" #include <SoftwareSerial.h> #define SOFTSERIAL_RX_PIN 2 #define SOFTSERIAL_TX_PIN 3
#define STEPS 32 // Number of steps per revolution of Internal shaft
int Steps2Take; // 2048 = 1 Revolution
SoftwareSerial softSerial(SOFTSERIAL_RX_PIN,SOFTSERIAL_TX_PIN);
/-----( Declare objects )-----/
// Setup of proper sequencing for Motor Driver Pins
// In1, In2, In3, In4 in the sequence 1-3-2-4
I got this script out of a tutorial Video and thaught i could rewrite and adapt it to use it with my stepper motor. just to explain where these characters come from. What would you suggest to use in stead?
And by writing not working i mean that my Solution didn't change anything to the fact that the motor doesn't stop spinning so i obviously wasn't able to reset the value. thanks for your patience.