I had some adjustments to make because there were parts of the arm that were to loose so I screwed them tighter and I changed one servo.
I then worked on the code because I wanted to map the claw : the SG90 servos are going from 0° to 180° but the clamp range is between 60° and 150°. Finally I just had to change the min and max range in my code :
if servo_index == 5:
new_angle = max(60, angles[servo_index] - 5)
[...]
if servo_index ==5:
new_angle = min(150, angles[servo_index] + 5)Once I finished the code I tested it with all the servos powered and everything worked, but the arm had some vibrations (because of the wire connections that aren't solid I guess).
I finished my project but I wanted to upgrade it because I still have time before the end of the semester so I talked with Vincent et Vladimir to have some ideas and we decided that the best solution for now would be to control the servos with sliders from an HTML page. Vincent said that I should ask Chatgpt to code the HTML/CSS/JavaScript et Python files.
I started by doing the index.html file that shows the positions of the servos when the sliders are moved.
Sylvain
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.