|
Page 1 of 1
|
[ 5 posts ] |
|
| Author |
Message |
|
Skinkworks
Rookie
Joined: Wed Mar 31, 2010 4:43 pm Posts: 12
|
 Multiple IR Seekers
My team's robot has 2 IR Seekers on it. We were trying to use both of them to aim at the high goal, but we ran into a problem: Both sensors reported the same values. I looked through the driver for the sensor to see if it may have been caused by the way it was coded, and it appeared that the code looked for the ID of the sensor above the port it was on. Could I have interpreted this wrong? How would I solve this problem?
|
| Wed Mar 31, 2010 4:53 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2865 Location: Rotterdam, The Netherlands
|
 Re: Multiple IR Seekers
Attach the program so we can see what is going on.
- 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]
|
| Thu Apr 01, 2010 1:54 am |
|
 |
|
Skinkworks
Rookie
Joined: Wed Mar 31, 2010 4:43 pm Posts: 12
|
 Re: Multiple IR Seekers
Here's the code.
|
| Thu Apr 01, 2010 4:05 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2865 Location: Rotterdam, The Netherlands
|
 Re: Multiple IR Seekers
You need to use sensorLowSpeed instead of sensorHiTechnicIRSeeker1200, this is also how it is done in the HTDIR-test1.c program. Change your pragma lines and all will be well.
- 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]
|
| Thu Apr 01, 2010 4:14 pm |
|
 |
|
Skinkworks
Rookie
Joined: Wed Mar 31, 2010 4:43 pm Posts: 12
|
 Re: Multiple IR Seekers
I found the real problem: IRfront and IRback were set to the same sensor port. Well, that's what you get for copy-pasting incorrectly. I did change the sensors to sensorLowSpeed, also.
|
| Thu Apr 01, 2010 7:32 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|