My team is looking to build a upgrade version of the claw bot, and I need help Programming. One of the upgrades would be a rotating claw. Here is the problem: we need to keep the claw level at all time. What sensor will I need on the claw? Anyone with a program that I could use.
I’m not sure exactly what you mean, but an easy non-motorized way to keep a claw at the same angle despite how high it is reaching is to use something called a chain bar.
Check out this video: https://www.youtube.com/watch?v=39Q2yKx__HI
Is that what you’re trying to do?
Very similar. The only problem is that we would have a expanding arm, therefore chain would not work and we would have to use a motor.
By “expanding arm” are you talking about a claw at the end of something like a linear slide?
If your range of claw wrist motion is less than about 250 degrees, then you could probably put one potentiometer (pot) on the claw’s wrist (NOT on the wrist motor) and another pot on the “shoulder” of the arm. You can determine a mathematical relationship between the pot values of the shoulder and those of the claw’s wrist to keep the claw level. Then you need some kind of loop to drive the wrist motor to maintain the claw pot reading within some acceptable window of error. Your joystick would control the shoulder motor and the claw wrist motor would respond to keep the claw level.
Which program language are you using?
We are using robotC