|
Re: Get Angle from Servo
Sorry for the confusion. My plan was initially to have the claw (powered by 2 window motors) backdrive the servo so I can read the angle.
My calibration was going to be basic, I have a 3:2 gear ratio before the servo so that when the claw spins say 90 degrees, the servo spins 60. Then If I adjust the claw to be horizontal manually (don't want to have to do this for each match which is why I was thinking of a servo), and then read in the angle, I can do some math to find out which angle is vertical and everything else.
This is why I figured encoders wouldn't work because they count rotations instead of angle position.
Yes, I now realize I could do a potentiometer and read in the analog value but I was hoping to take advantage of an already existing system. On this note though, is the analog 5V source on the cRIO module regulated enough to do this accurately?
My other thought was use the servo.read() function on an Arduino and then send the data over to the cRIO via some kind of communication. (I2C appears to be commonly used but I wonder how Ethernet would work, assuming its an Arduino Ethernet).
So I guess my question now is, what is the best way to accomplish something like this?
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
|