Control the robot arm to swing left and right
Preparation before starting
M5Stack series: Make sure the robot arm is connected to the computer
Other series: Make sure the machine is normal
Learning content in this chapter
How to use myBlockly to control the robot arm to swing left and right
API display
- Method module 1:
Power on
Applicable scope: myCobot280 series, myCobot320 series, mechArm series, myPalletizer series
Purpose: Start the system
Method module 2:
Release joints
Applicable scope: myCobot280 series, myCobot320 series, mechArm series, myPalletizer series
Purpose: Stop the movement of the robot arm and lock each joint
Simple demonstration
- The graphic code is as follows:
- Implementation content:
Power on the robot arm and control the robot arm to move back to the origin. After two seconds,
Control the robot arm 1 joint to run to the angle 50 position at a speed of 20. After two seconds,
Control the robot arm 2 joint to run to the angle 20 position at a speed of 20. After two seconds,
Control the robot arm 2 joint again to run to the angle -50 position at a speed of 20. After two seconds,
Loop the control of the 2 joints twice. After the loop ends,
Run the 1st joint, 2nd joint, 3rd joint and 4th joint at a speed of 20 to the angles of 130, 80, -60 and 100 respectively.
Finally, the robot arm movement is paused, all joints are released, and the program ends.