User Manual
3 Direction
DirectionPin:
+5Vordangling,motormovesforward;
GNDorcathode,motormovesbackward.
4 FG FGsignalpin(needapullupresister5k)
5 Power+ POWER+(12V)
Note:Sometime,themanufacturerprovidesadifferentcolorcable,butthecableorderissame.
Tutorial
Hereisaexamplehowtousethismotor,Justfollowtheguide,andyouwillgetitwork.
Requirements
First,preparethefollowinghardwareandsoftware.
Hardware
UNOx1
Motorx1
Software
ArduinoIDEV1.6.5ClicktoDownloadArduinoIDE(https://www.arduino.cc/en/Main/Software)
ConnectionDiagram
Afterthehardware,themoduleisconnectedwiththeUNOinthefollowingdiagram.
SampleCode
1.OpentheArduinoIDEandcopythefollowingcodetotheIDE.Selectyourboard'sserialportandtheboardtype(e.g.ArduinoUNO)anduploadthesample
code.
2.OpentheSerialmonitor.
3.Enteranumberbetween0and255tosetthemotor'sspeed.(0:Maxmumspeed;255:Stop)
Thecodewillalternatesitsrotationdirectionevery5seconds.