VMA333
V. 01 – 16/04/2018
4
©Velleman nv
Connection.
TB6560 driver board======4-wire stepper motor
A+======red wire
=A-=====blue wire
B+======green wire
B-======black wire
void setup() {
pinMode(3,OUTPUT);
pinMode(A0,OUTPUT);
// Set pin 9's PWM frequency to 3906 Hz (31250/8 = 3906)
// Note that the base frequency for pins 3, 9, 10, and 11 is 31250 Hz
//setPwmFrequency(9, 8);
// Set pin 6's PWM frequency to 62500 Hz (62500/1 = 62500)
// Note that the base frequency for pins 5 and 6 is 62500 Hz
//setPwmFrequency(6, 1);
// Set pin 10's PWM frequency to 31 Hz (31250/1024 = 31)
//setPwmFrequency(10, 1024);
analogWrite(3,128);
}
void loop() {
digitalWrite(A0,HIGH);
delay(2000);
digitalWrite(A0,LOW);
delay(2000);
}