Stepper库

本页面开发制作中…

步进电机介绍
Stepper库简介
通过Stepper库控制步进电机机
Stepper库函数
Stepper库控制步进电机示例


步进电机介绍

想要了解如何使用Arduino控制步进电机,首先要了解步进电机的基本工作原理与结构。假如您在这方面的知识仍有些欠缺,那么请参考我们太极创客团队为您编制的这篇图文教程:步进电机基本原理介绍

《步进电机基本原理介绍》中的知识内容是本篇教程的基础,所以请您务必了解了这些知识以后再进行接下来的学习。


Stepper库简介

This library allows you to control unipolar or bipolar stepper motors. To use it you will need a stepper motor, and the appropriate hardware to control it. For more on that, see Tom Igoe’s notes on steppers.


Arduino控制步进电机的电路连接

  • Unipolar Steppers
  • Bipolar Steppers


Stepper库函数

  • Stepper(steps, pin1, pin2)
  • Stepper(steps, pin1, pin2, pin3, pin4)
  • setSpeed(rpm)
  • step(steps)


Stepper库控制步进电机示例

  • Motor Knob: Control a highly accurate stepper motor using a potentiometer.
  • Stepper One Revolution: Turn the shaft one revolution clockwise and one counterclockwise.
  • Stepper One Step At A Time: Turn the shaft step by step to check the proper wiring of the motor.
  • Stepper Speed Control: Control the stepping speed with a potentiometer.