First thing first, sorry but I’m an extreme noob when it comes to C coding, this is my first Arduino project, so I would really appreciate if you guys could elaborate on solutions and suggestions.
Hi, I am building a robotic 5 servos hand as a college project, and having a bit of trouble. My
project counsler found an MPU6050 code ( trying to write one ourselves was a complete failure, and looking at the code he found, it is obvious why, I’ll link it below ) that I have added a bit of setup to make the servos work and obey all the angles and axis. It worked ( most of the time ) like a charm as seen in this link, but then annoying stuff started to happen. My biggest problem was that instead of starting to move or await orders, one of the servos would spas, make a rotation to one of the ends, and try to move further, making grinding and buzzing sounds which are pretty alarming. It’s weird because it would’nt always happen.
My project counsler suggested it could be a timing issue in the program, that me adding code to it is breaking the balance.
Another problem would be that the servo would spin to the “current angle” of the MPU, making the same buzzing sound and sometime ignoring the rest of the servos until I would move the MPU to an angle that the servo accepts, I guess? I would have to rotate the MPU on the table.
I have checked the servos and replaced one of them, but it didn’t solve the problem.
My question are:
- Is there a way to make the current angle the MPU the starting angle ( 0 or 90 degrees )?
- Is there a way to prevent the servo from going to grind mode ( code just won’t let it )?
- If it really is a timing issue in the MPU code, how can I fix it?
Thank you for your time.
I am attaching the code to the message, It goes over the charcter limit here.
ThreeAxis.ino (36.2 KB)