![]() |
DriverStation::GetAnalogIn - what range?
From the C++ reference manual:
DriverStation::GetAnalogIn returns the analog voltage on the input. The analog values are returned as UINT32 values.... Let's keep it simple, ignoring noise: 1) when an analog input is at ground, what value is returned? 2) when an analog input is at +5V, what value is returned? |
Re: DriverStation::GetAnalogIn - what range?
The Driver Station has a 10 bit ADC. This means that the possible range of values is from 0 to (2^10)-1, or 0 to 1023.
I just looked at the source code for the DriverStation, and I'm actually a little confused about it. FRCComm.h describes the analog inputs like this: Code:
struct FRCControlData{Code:
/**The @return comment implies that it returns the actual voltage on the analog port -- but how does it do this? It doesn't look right to me, and could be an oversight by the WPI Library developers. If it's not, perhaps someone else could help explain this... |
Re: DriverStation::GetAnalogIn - what range?
For reference, I've posted about this on the official FRC Control System forum here:
http://forums.usfirst.org/showthread.php?t=12254 |
Re: DriverStation::GetAnalogIn - what range?
Quote:
Quote:
We are using these with version WPILib 3.0, and have tested and used on our production bot. Not that this is the intended behavior, but that is what it returns. |
| All times are GMT -5. The time now is 13:11. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi