张高兴的 Windows 10 IoT 开发笔记:使用 ULN2003A 控制步进电机
本文约 156 字,包含 1 张图片,3 个代码段,阅读时间约 1 分钟
在手机上查看此页面
This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#.
GitHub:https://github.com/ZhangGaoxing/windows-iot-demo/tree/master/ULN2003A
Screenshot
Connect
- In1 - GPIO 26
- In2 - GPIO 13
- In3 - GPIO 6
- In4 - GPIO 5
Reference
https://github.com/erickbp/IoT/tree/master/Stepper%20Motor
http://edi.wang/post/2016/4/4/windows-10-iot-stepper-motor
What Have I Changed
- You can input a different Step Angle value to control other stepper motor.
- Added some notes.
How to Use
- First, you need to create a ULN2003A object
ULN2003A uln2003a = new ULN2003A(26, 13, 6, 5);
- Second, TurnAsync().
await uln2003a.TurnAsync(degree, stepAngle, TurnDirection.Left, DrivingMethod.FullStep);
- If you want to close the sensor, call Dispose().
uln2003a.Dispose();