Hello I have two big problems for my project , firstly i don't find code to controls 4 stepper motors and i don't know where to learn how to code it my self secondly the project is to make a braille watch so the 4 steppers need to be control by a sort of clock , my idea is to turn 4 cylinder with braille number on it so the first cylinder need to turn every minute the seconde every ten minute the third every 1hour and the fourth every 10 hours but i didn't find anything either ( i don't know if its clear sorry ) at this time i made this (i think it should work but not sure).
I use a arduino mini , L293D Driver , and this stepper motors .
Oh and i read a topic where one of you discuss about newbies and its said anyone will do the code for another but the fact is even i want to learn i have no idea where to start ...
And from your experience how many time it will take to achieve the skill to make my project and is it possible to tell the stepper to turn 1 time every seconde , minute , hour (its the most importante ) ? thanks you and i will try but i really don't like to code im more manual.
Im not good in French so in English its even worse and well i will learn how to code it by my self one thing i hate more than coding its paying for stuff i can do for free .
Thanks you very much for your time i re contact you when i finished the code .
/*
Stepper Motor Control - one revolution
This program drives a unipolar or bipolar stepper motor.
The motor is attached to digital pins 8 - 11 of the Arduino.
The motor should revolve one revolution in one direction, then
one revolution in the other direction.
Created 11 Mar. 2007
Modified 30 Nov. 2009
by Tom Igoe
*/
#include <Stepper.h>
const int stepsPerRevolution = 20; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper1(stepsPerRevolution, 2, 3, 4, 5);
Stepper myStepper2(stepsPerRevolution, 10, 11, 12, 13);
Stepper myStepper3(stepsPerRevolution, 14, 15, 16, 17);
void setup() {
// set the speed at 60 rpm:
myStepper1.setSpeed(60);
myStepper2.setSpeed(60);
myStepper3.setSpeed(60);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("5");
myStepper1.step(stepsPerRevolution);
delay (100);
myStepper2.step(stepsPerRevolution);
delay (100);
myStepper3.step(stepsPerRevolution);
delay (500);
}
and it work ... almost the thing is it only work when I wired up the Arduino the stepper and the driver that way
I need to remove the Cyan wire ( i really don't know why ) but not every where only on the 1st en 3rd stepper ... if they are wired up the stepper don't turn is just like vibrating . ( the code when he work make move the first stepper 20 steps than the seconde than the third and Stepper myStepper3(stepsPerRevolution, 14, 15, 16, 17); 14 i the pin A0 ,15 is A1, 16 is A2, 17 is A3 )
So my questions is whats wrong , the code ? the way i wired all the thing ?
If you edit the schematic to have a logical flow of input to output left to right and power at top then you can usually make it very neat and readable.
Does F**ing have ground symbols? Use them instead of scribbling ground all over the schematic.