|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Re: HELP: analog input
Make sure you are calling the function
Code:
Set_Number_of_Analog_Channels(SIXTEEN_ANALOG); /* DO NOT CHANGE! */ Good luck. |
|
#17
|
|||||
|
|||||
|
Re: HELP: analog input
Okay, here is code from our robot this year. This is exactly how we have written it and it works.
We made variables on top of the file: Code:
unsigned int BottomSonic = 0; Code:
Getdata(&rxdata);
TopSonic = Get_Analog_Value(rc_ana_in02);
printf("Top: %d\r\n", TopSonic);
Putdata(&txdata);
Also, try it on a fresh piece of code with the absolute default code from IFI. |
|
#18
|
|||||
|
|||||
|
Re: HELP: analog input
Make sure your init functions are correct.
and call the get_analog_value() |
|
#19
|
|||||
|
|||||
|
Re: HELP: analog input
You left out important details here. Please replace the word "correctly" with a description of the actual connection to the Robot Controller.
|
|
#20
|
||||
|
||||
|
Re: HELP: analog input
I have been having the exact same issue. I tried IFI's ADC, Kevin Watson's integrated into my code, Kevin Watson's from his website(unmodified), and whatever EasyC uses.
They all read 0. I have tried both the 2006 and 2007 controllers. I have the pot connected so the 5v+/gnd each connect to one side of the pot, and the signal is connected to the middle connector on the pot. If I short the gnd/sig pins the reading does NOT change. I have used Kevin Watson's ADC without any issues before now. I have run it on VEX, EDU, and 2005 controllers. I was at the Sussex mini-regional today and talked to 4-5 other programmers, and none of them had any ideas. What am I missing? Thanks, Eric Haskins |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FRC analog input RC filter values | Gdeaver | Control System | 2 | 01-01-2006 22:03 |
| Analog and digital input question | Robby | Control System | 7 | 30-04-2005 20:07 |
| Analog Input Trouble | Matt Krass | Programming | 10 | 20-01-2005 21:09 |
| Resistance to Analog Input Value. | Josh Hambright | Electrical | 12 | 15-04-2003 16:12 |
| DC Motor current to an Analog Input | junkyarddawg | Motors | 43 | 04-04-2002 15:53 |