shebuildsrobots / remy_model

55 stars 3 forks source link

Add second accelerometer controlling left arm. #5

Closed ali-raheem closed 6 days ago

ali-raheem commented 6 days ago

Updated the code to allow a another accelerometer for the left arm.

Relies on MPU6050's AD0 pin, should be ground for right arm (I2C addr 0x68) and high for left arm (0x69).

I've not refactored (would benefit from an ArmController object) the code but did remove the global x_axis_acceleration.

shebuildsrobots commented 6 days ago

Awesome, thank you! And congrats on being the first contributor!

Looks good, but to confirm, have you flashed this to the microcontroller and tested it, @ali-raheem?

ali-raheem commented 6 days ago

I've tested it without the Remy model, and it's just occured to me that the left arm should be moving counterclockwise versus the right. They were moving in the same direction in my test!

I fixed this by flipping the 40 and 160 in the left servo and the arm needs to be repositioned.

shebuildsrobots commented 6 days ago

Thanks!