Did you use google as there are many examples on the forum/internet.
More important than the code is to get the (separate) power supply right and to have opto-coupling between Arduino and motor.
Did you use google as there are many examples on the forum/internet.
More important than the code is to get the (separate) power supply right and to have opto-coupling between Arduino and motor.