So it's been many years since I touched any eletronic stuff but I missed it dearly.. the idea of building a robot from scratch always been my dream... I already forgot a lot of basic stuff so bear with me
I decided to play with what I have in stock; an arduino uno and arduino uno motor shield rev 3 (I got them a year ago for a project that I eventually found another solution to...)
I was googling instructions (as well as electronics tutorials despite the fact I have a degree in mechatronics - father time erased most of it!) and I found some basic tutorial on how to use a motor shield. So I connected the motor shield on top of the uno and then additionally connected a stepper motor where the tutorial told me to (I think it's a stepper motor because it only rotates in certain degrees). Here's the lovely setup: (ignore the poor soldering debris in the background and the nail file I'm using because I don't have a small screw )
I tried to run the script and the motor was activated, but I wasn't really sure what's going on and how do I truly "control" it. Here's the script that I'm currently using:
int A = 3;
int B = 4;
If A and B are the same the motor starts acting out: internally something seems to move or vibrate but the shaft itself isn't, and then after 5-10 seconds it stops altogether. When A and B are different it works, but it always turns in the same direction no matter what I choose A and B to be.
- Why is the motor acting out when A and B are the same number?
- How can I get it to spin in the other direction?
- How do I control its speed? With analogwrite?
- More basic question: Do I really have to upload the script every time I want to change the motor's speed? Isn't there a simpler interface where I can just click and it changes the motor's speed?
- How can I be sure it's a stepper motor?