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
Introduced in R2014b
arduino | addon | stepper | move
arduino
addon
move
You have a modified version of this example. Do you want to open this example with your edits?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
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