[Stepper]
描述
Turns the motor a specific number of steps, at a speed determined by the most recent call to setSpeed(). This function is blocking; that is, it will wait until the motor has finished moving to pass control to the next line in your sketch. For example, if you set the speed to, say, 1 RPM and called step(100)
on a 100-step motor, this function would take a full minute to run. For better control, keep the speed high and only go a few steps with each call to step()
.
參數
steps
: the number of steps to turn the motor – positive to turn one direction, negative to turn the other (int)
回傳
None
參考
函式庫參考主頁面
86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。