Hello everyone,
I'm working with a friend on a school project,
We are using an Arduino Uno and a Motor Shield. We want to rotate a stepper motor, we tried to connect on the pins (8;9;10;11), as said in the code :
<<Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);>>.
It works good, but we need more power so we want to connect the motor to the blue bar (like showed in the picture).
So, we need your help because we dont know what to put instead of the code quoted above.
(Here is the full code, if it can help you
<<#include <Stepper.h>
const int stepsPerRevolution = 300;
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
*int pinBouton; *
void setup() {
-
myStepper.setSpeed(50);*
-
// initialize the serial port:*
-
Serial.begin(9600);*
-
pinBouton=6; *
-
pinMode(pinBouton,INPUT);*
}
void loop() { -
boolean etatBouton = digitalRead(pinBouton);*
-
//test des conditions*
-
if (etatBouton==HIGH)/*
-
{*
-
//*
-
Serial.println("clockwise");*
-
myStepper.step(stepsPerRevolution); *
-
delay(10000);*
-
//*
-
Serial.println("counterclockwise");*
-
myStepper.step(-stepsPerRevolution);*
-
}*
}
>>
[/color]
Thank you for your help