Function of the Module
Experiment 1: Servo Use
Overview
- How to use graphical programming to control the servo?
- Different from regular motors, servo can not only rotate but also can rotate to a certain angle(0-180 degrees) according to your commands.
Bill of Material
- Other Hardware Equipment
- A servo
- One USB cable
- One sensor cable
Hardware Buildup
- Setup 1:Connect Microduino-Servo Connector and the servo to the upper row of pins.
- Setup 2:Connect Microduino-Servo Connector with pin 8 of the Hub.
- Setup 3:Assemble all hardware, and connect them to a computer with a USB cable.
Mixly Programming
- Setup 1:Drag out the servo control module from "Executer".
- Setup 2:"Servo Control Module" description.
- Setup 3:Make the servo rotate to a certain angle.
Debugging
- Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
- Step2:Upload the program.
- Watch the result and you'll see the servo rotates from 0 to 90 degrees for one second, and then from 90 to 0 degree for one second, which happens repeatedly.
Experiment 2: Servo Rotates Slowly
Overview
To make the servo rotate within 0-180 degrees.
Hardware Connection
Same with【Experiment 1: Servo Use】
Mixly Programming
- Find "Loop" from the item of "Control".
- Complete the buildup and then check the syntax description.
Debugging
- Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
- Step2:Upload the program; The servo rotates 1 degree every 15ms and repeats rotation from 0 to 180 degrees.
|