Quote:
Originally Posted by Generalx5
Um...im getting an analog value from 0 - 22. or 0-23, is this right? I thought it was supposed to be from 0 to 254?
|
Nope, not right, so something is odd.
The direct analog inputs on the EDU controller have 10-bit resolution, so you should see 0-1023 returned as values.
If you are talking about the analog input from a radio transmitter joystick, then that value is indeed 0-254.
How exactly are you printf-ing the value? There may be a simple error there. At least that's where I'd check first.
I assume it looks something similar to:
Code:
printf("Analog input = %d\r\n", (int) Get_Analog_Value(rc_ana_in01));
Is the analog input port initialized properly? e.g., Set_Number_of_Analog_Channels(ONE_ANALOG); // one or more