树莓派通过GPIO控制步进电机
一、接线方式与GPIO调用方法:
- 电源接入+5v和GND
- In1-4分别接GPIO1-4
- 正转时,GPIO1-4分次传入:[1,0,0,0],[sleep],[0,1,0,0],[sleep],[0,0,1,0],[sleep],[0,0,0,1]
- 逆转时,GPIO1-4分次传入:[0,0,0,1],[sleep],[0,0,1,0],[sleep],[0,1,0,0],[sleep],[1,0,0,0]
- 停止时,GPIO1-4一次传入:[0,0,0,0]
二、电机图
![](https://images2018.cnblogs.com/blog/364036/201712/364036-20171203140909663-187226867.png)
宋兴柱:转载内容,请标明出处,谢谢!源文来自 宝贝云知识分享:https://www.dearcloud.cn