Presentation is loading. Please wait.

Presentation is loading. Please wait.

Program the robotic arm

Similar presentations


Presentation on theme: "Program the robotic arm"— Presentation transcript:

1 Program the robotic arm

2 Servo motor Know the color code Orange – signal (S) Red – 5V (V)
Brown – Ground (G) Connect the 4 servo motors to the shield Try to use

3 Arduino shield

4 Servo motor basics Servo motor can only turn from 0 to 180
The motor is controlled by pulse

5 Program Arduino Need to tell Arduino to output the pulse to control the motor Easy – using the software library Servo.h Define a servo object in the program for each servo Servo myservo Need to tell the Arduino where is the servo motor attach Use the write function to tell control the turning degree

6 Sample program Download sample program from ftp site
ftp://ftp.ee.polyu.edu.hk/yffung/freshman_project/

7 How to program Start the Arduino IDE (integrated development environment) File -> new Write the program Select the proper Arduino board Tools -> board -> Arduino Uno Select the proper Port Tools -> Port

8 Exercise Program the arm so that it can Pick up an object
Turn left and put down the object Return to the starting position Record angle used by different servo motors in order to achieve the task

9 Control the arm with serialPort
The arm will be controlled by the camera (next week) The notebook and the Arduino are connected by the serialport In the Arduino program – need to wait for signal from serialport Based on received signal – arm carries out different operations

10 Arm control Example If receive ‘R’ then pick up object and turn left
If receive ‘B’ then pick up object and turn right

11 Exercise Program the arm so that
Receive ‘B’ pickup object-> turn left-> put down object -> return to starting position Receive ‘D’ pickup object -> turn right-> put down object -> return to starting position Use the Serial Monitor to simulate the signal coming from the serialport


Download ppt "Program the robotic arm"

Similar presentations


Ads by Google