Help CenterHelp Center
Release stepper motor connected to Adafruit Motor Shield
release(sm)
example
release(sm) releases the stepper motor, allowing it to rotate freely.
sm
collapse all
Connect to Arduino® hardware, and create an add-on connection to an Adafruit® Motor Shield.
a = arduino('COM4','Uno','Libraries','Adafruit/MotorShieldV2'); shield = addon(a,'Adafruit/MotorShieldV2');
Create a stepper motor connection to motor number 1 on the shield, with steps per revolution of 200 and an RPM of 10.
1
sm = stepper(shield,1,200,'RPM',10);
Rotate the motor 10 steps, and release it.
move(sm,10); release(sm);
Stepper motor connection, specified as a stepper motor object, created using the stepper function.
stepper
arduino | addon | stepper | move
arduino
addon
move
この例の変更されたバージョンがあります。編集された方の例を開きますか?
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office