I want to find...

検索

Shares

Table of Content

Stepper()

[Stepper]

説明

This function creates a new instance of the Stepper class that represents a particular stepper motor attached to your 86Duino board. Use it at the top of your sketch, above setup() . loop(). The number of parameters depends on how you’ve wired your motor – either using two or four pins of the 86Duino board.

構文

Stepper(steps, pin1, pin2)
Stepper(steps, pin1, pin2, pin3, pin4)

媒介変数

  • steps: the number of steps in one revolution of your motor. If your motor gives the number of degrees per step, divide that number into 360 to get the number of steps (e.g., 360 / 3.6 gives 100 steps). (int)
  • pin1pin2: two pins that are attached to the motor (int)
  • pin3pin4: optional the last two pins attached to the motor if it’s connected to four pins (int)

戻り値

A new instance of the Stepper motor class.

Stepper myStepper = Stepper(100, 5, 6);

See also


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

上部へスクロール