|
ninerNation
Rookie
Joined: Sun Nov 04, 2012 5:30 pm Posts: 6
|
 IR Seeker distance and signal problem
hey guys, i actually have 2 questions involving the 3rd party driver code i am using the 3rd party methods to track the direction and signal however my directional reading remains constant and doesn't change even when placed in an infinite loop and my signal reading is inconsistent- one time the reading will be something like 50 then next run will be 180
my methods being used are: HTIRS2readACDir(IR) - for direction HTIRS2readAllACStrength(IR,acS1,acS2,acS3,acS4,acS5);
Here is a test code which i ran to check if my values being sensed are right:
task main() { int dir = 0; int acS1, acS2, acS3, acS4, acS5 = 0;
while(true) { dir = HTIRS2readACDir(IR); nxtDisplayBigStringAt(0, 30, "%d", dir); } //I ran this separate, but same variables apply
while(true) { HTIRS2readAllACStrength(IR,acS1,acS2,acS3,acS4,acS5); nxtDisplayBigStringAt(0, 30, "%d", dir); } my problem is that "dir" doesn't change and my signal strength has inconsistent readings
|
|
ninerNation
Rookie
Joined: Sun Nov 04, 2012 5:30 pm Posts: 6
|
 Re: IR Seeker distance and signal problem
hey guys never mind my pragma statement was wrong and now the direction works but regarding the signal strength is that wrong or is it naturally inconsistent
|
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2861 Location: Rotterdam, The Netherlands
|
 Re: IR Seeker distance and signal problem
Yeah, it depends very heavily on how many of the ball's IR LEDs are facing you and that changes all the time when the ball rolls around. It also depends on other interferences, such as fluorescent lights, etc.
= Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|