blob: 3e48358ba36929b9b718ae018035b2b94e95b98e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
simple rotation of the motor
the gear ration on the carousel is
7/40 and there is 10 slots to rotate between
*/
//define Pins
#define PulPin 7
#define dirPin 6
int pd = 500;
void setup() {
pinMode(PulPin, OUTPUT);
pinMode(dirPin, OUTPUT);
}
void loop() {
digitalWrite(dirPin, HIGH);
digitalWrite(PulPin, HIGH);
delayMicroseconds(pd);
digitalWrite(PulPin, LOW);
delayMicroseconds(pd);
}
|