|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Should I use a Pot or an encoder, and how?
I'm having a problem, I'm trying to figure how I would count the revolutions of the driveshaft in autonomous so I can create a simple distance = (2 * revolutions * 3.14159) equation. However, with the refresh rate I don't think I could correctly count revolutions without errors.
|
|
#2
|
|||
|
|||
|
Re: Should I use a Pot or an encoder, and how?
What you really should use is called a quadrature encoder and you can find some sample code for it on www.kevin.org/frc
Also, I think you need wheel radius in that equation. ![]() |
|
#3
|
||||
|
||||
|
Re: Should I use a Pot or an encoder, and how?
Quote:
|
|
#4
|
||||
|
||||
|
Re: Should I use a Pot or an encoder, and how?
You need to use encoders. Pots can only rotate a certian number of degrees before hitting their physical limits. If you search encoders on these forums you should find alot of good info.
|
|
#5
|
|||
|
|||
|
Re: Should I use a Pot or an encoder, and how?
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|