|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
IR signals inverted
For some reason the EDU controller is interpretting signals on the first and second digital inputs as 0 and no signal as 1. Am I missing something or is this not correct? I use PrintByte() to print the value of each and the beacons/sensors are functioning perfectly. What could be causing this?
|
|
#2
|
|||
|
|||
|
Re: IR signals inverted
Quote:
Well the IR sensor (Spec Sheet), will output a logic high (+5v) when it does not see a signal, and a logic low (0v) when it does see a signal. This appears to be what you are seeing. |
|
#3
|
|||
|
|||
|
Re: IR signals inverted
Thanks, so it would seem that they were working after all.
|
|
#4
|
|||
|
|||
|
Re: IR signals inverted
Those are the best kinds of problems.
![]() |
|
#5
|
||||
|
||||
|
Re: IR signals inverted
Quote:
-Kevin |
|
#6
|
|||
|
|||
|
Re: IR signals inverted
Actually I don't think it has anything to do with the sensor output. When I manually connect the pins it reads as 0 and when they are not connected it reads as 0.
|
|
#7
|
||||
|
||||
|
Re: IR signals inverted
is it possible you redefined the port in your code somewhere to make the pin an output instead of an input?
is it possible you connected something to the pin that you shouldnt have, like 12V, and blew out the input circuit for that pin? I would look up how to connect a simple switch to the port (in the RC reference manual) and try reading the port that way - you cant get any simpler than a switch - if the pin is blown out, and you dont need to use all your input pins, then use another one. |
|
#8
|
|||
|
|||
|
Re: IR signals inverted
Anything is possible, but not likely. I've triple checked the code to make sure they are inputs. What I said is true for EVERY pin on the EDU controller. I tried the switch method with the same result.
|
|
#9
|
|||
|
|||
|
Re: IR signals inverted
Any ideas? Am I missing something?
|
|
#10
|
|||||
|
|||||
|
Re: IR signals inverted
Quote:
How are you displaying the value? Are you typecasting (int) the char value? e.g., Code:
printf("rc_dig_in1 = %d\n", (int) rc_dig_in1);
Code:
IO1 = IO2 = INPUT; . . . /* SECOND: Configure the number of analog channels. */ Set_Number_of_Analog_Channels(NO_ANALOG); /* See ifi_aliases.h */ Last edited by Mark McLeod : 08-02-2004 at 13:25. |
|
#11
|
|||
|
|||
|
Re: IR signals inverted
Ok, that is what we are getting. 1 when disconnected and 0 when connected.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Radios not getting signals | BrendaB | Control System | 3 | 24-01-2004 22:50 |
| nats: stoping conflicting robot signals? | JasonStern | Technical Discussion | 25 | 25-05-2003 00:37 |
| visual signals from operator allowed? | angelina | Rules/Strategy | 16 | 23-01-2003 20:11 |
| Referee hand signals | archiver | 1999 | 1 | 23-06-2002 21:57 |
| problems with receiving signals between radios (need help0 | chrisw | Technical Discussion | 4 | 11-01-2002 10:35 |