or (at your option) any later version. # motor = board.set_pin_mode_stepper(interface=2, pin1=4, pin2=5) motor = board.set_pin_mode_stepper(interface=2, pin1=5, pin2=4) # if you are using a 28BYJ-48 ...
秋月電子通商で販売されているステッピングモータ 28BYJ-48-W0を現在企画中の製作物に使えないか試してみることになりました。制作物はArduinoで制御する予定ですが、Arduinoでステッピングモータを直接駆動することはできないので、ドライバICで制御します。
基板のIN1, IN2, IN3, IN4に、ArduinoのD8, D10, D9, D11を接続する。 また、基板にモータ電源5Vを供給するが、GNDの共有は不要。 以下のプログラムをArduinoに書き込めば、1秒おきに正負1回転する。 #include <Stepper.h> const int stepsPerRevolution = 2048; // 1回転のステップ数 const ...
This code is still experimental, so use it on your own risk. This library is programmed in pure Python. The performance of Python is not good enough to drive the motor with high speed. So if you move ...