|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Failing analog inputs?
Has anyone else had any issues w/ the analog inputs reading a constant value no matter what you do w/ them? To the best of my knowledge, we have a defective controller. But i dont want to go a week w/o the controller while they replace it, unless i'm absolutly sure.
|
|
#2
|
||||
|
||||
|
Re: Failing analog inputs?
I havent looked at the code for this year too much yet, but last year, if you wanted to use an analog or digital input on the RC there were TWO places where you had to 'enable' it.
maybe this is why you are not seeing the input in the variable you are looking at? |
|
#3
|
|||
|
|||
|
Re: Failing analog inputs?
Make sure you do Get_Analog_Value(rc_ana_in01);
rc_ana_inxx are just the channels on the ADC, not the actual value. Get_Analog_Value() takes an ADC channel and returns the (10-bit) value on that channel. We just modified the #defines for all the rc_ana_inxx to include the function call. #define rc_ana_in01 Get_Analog_Value(ADC_CH0) |
|
#4
|
||||
|
||||
|
Re: Failing analog inputs?
Quote:
|
|
#5
|
||||
|
||||
|
Re: Failing analog inputs?
Quote:
second problem - code error. Thanks |
|
#6
|
||||
|
||||
|
Re: Failing analog inputs?
HW and SW people always seem to be at odds with each other, esp when something is not working like it seems it should.
There is something I call "computer science 101 syndrome" typically when a student takes their first programming class in college, they are given a very simple program to write, like add three numbers and print the result. half the students will make a mistake in the syntax or control language or something (esp when using a mainframe) and they wont be able to see the problem in the code, so at some point they exclaim: "THAT STUPID COMPUTER IS NOT WORKING RIGHT!" You are in good company, and you are not the first! :c) |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Some EDURobotics Problems | squide | Robotics Education and Curriculum | 9 | 20-01-2004 10:27 |
| How to access other Digital inputs on OI? | DougHogg | Electrical | 2 | 12-03-2003 13:57 |
| Digital inputs, bandwith, errors? | Micah Brodsky | Programming | 7 | 20-01-2003 16:08 |
| Analog vs Digital inputs? | f22flyboy | Programming | 8 | 08-11-2002 22:18 |
| Serious Controller Ideas | archiver | 1999 | 28 | 23-06-2002 23:01 |