Servo

From Microduino Wiki
Revision as of 03:00, 28 March 2016 by Admin (talk) (Created page with "{| style="width: 800px;" |- | =Function of the Module= *'''Please refer to :The Use of Servo''' =Experiment 1: Servo Use= ==Overview== *How to use graphical programming t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

  • Module
Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-Servo 1 Servo pin board
  • 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.
MCookie-Servo Connector-sensor.JPG
  • 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).
Mixly board COM.jpg
  • 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".
Mixly for.jpg
  • Description for "Loop".
  • 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).
Mixly board COM.jpg
  • Step2:Upload the program; The servo rotates 1 degree every 15ms and repeats rotation from 0 to 180 degrees.