I created an Arduino program that uses M5stack Core2 to control Unit 8Servos with Unit 8Angle.
Unit 8Servos is connected to an SG90 servomotor, which moves the Robotic Arm.
ConstitutionThe Arduino program is written on the M5Stack Core2.
The Unit PaHUB is connected to PortA of the Core2.
The Unit 8Angle is connected to PaHUB Port1, and the Unit 8Servos is connected to PaHUB Port2.
Servomotors SG90 are connected to the Unit8 Servos.
You can move the SG90 by operating the 8Angle and controlling the 8Servo.
The Robotic arm's skeleton is made with a 3D printer.
The values for each channel are displayed in real time on the Core2 display.
In addition, the operating range can be limited to prevent the servomotor from becoming overloaded.
For details, refer to the program comments.
Move
The 8Angle library and 8Servos library provided by M5stack both defined constants with exactly the same names, _8bit and _12bit, internally.
This causes a name collision when compiling the program.
To avoid this, please change the function names individually.
Comments