step(steps)
描述
使步進馬達轉動指定的步數。轉動的速度則依據 setSpeed()
的設定。該函式是阻塞(blocking)型,也就是在步進馬達轉動到指定的步數前,該函式不會結束去執行下一行程式碼。舉例來說,如果你的步進馬達轉一圈需要 100 步並且轉動速度設定為 1 RPM,那執行 step(100)
所要花的時間就是 1 分鐘。
參數
steps
:步進馬達轉動的步數,參數的正負代表方向,型態為 int
回傳
無回傳值
See also
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.