|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IR sensor corruption help
We have a problem with our IR chip. For some reason the fourth button we assigned to the IR chip is messing up. When we turn on our autnomous code using a paperclip in the competition spot in the controler, the fourth button's command starts going on it's own. The remote we have set up was not pointed at the sensor, and nothing was pressed. We quickly removed the paperclip, and things worked again tried it again, same thing happened.
So we tested again by commenting out what button four did on the program. The other three buttons and their reactions worked just fine. We put the missing part of the program back in and BAM! Same problem. Then someone looked up the update from FIRST, and it said that the IR chip was becoming faulty under circumstances we had been doing. (Leaving the battery plugged in all the time and leaving it hooked up to the robot) Is the IR chip our problem with the program, and is there any way to fix it? Or is our problem with our program and the IR chip should be perfectly fine? Please Help! ~Team 0937 |
|
#2
|
||||
|
||||
|
Re: IR sensor corruption help
If you're taking values incorrectly from the IR sensor, the fourth may be the last one being updated. The IR sensor returns zero if a button is hit and 1 if it is not. 0 is also the unattached value. I suggest first posting your code or shuffling the order of your ifs/cases and see if another button is being triggered. If the fourth button still triggers, your sensor may not be wired right.
|
|
#3
|
|||||
|
|||||
|
Re: IR sensor corruption help
I suspect the fourth output from the IR sensor is not electrically connected to the digital input and thus always reading 1 in the program. Check your electrical connection with a multimeter
|
|
#4
|
|||
|
|||
|
Re: IR sensor corruption help
The programming leader here thinks that the order will have nothing to do with it. But we just started our lunch break, so when we get out of it, I'll change it and try that.
We also tried moving the IR chip's input from rc_dig_in04 to rc_dig_in05, but it's still causing the same problem. Here's the autnomous code in question. Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IR sensor???plz help | bilal1219 | Programming | 3 | 12-02-2008 10:05 |
| Sensor Help | itzrobz | Programming | 1 | 05-02-2006 14:07 |
| 3DS File Corruption | Capt. Slash | 3D Animation and Competition | 4 | 28-01-2006 13:21 |
| table corruption... round 2 | Brandon Martus | Announcements | 0 | 18-12-2001 23:57 |
| table corruption | Brandon Martus | Announcements | 2 | 20-11-2001 05:16 |