View unanswered posts | View active topics It is currently Tue Jul 29, 2014 1:57 pm






Reply to topic  [ 5 posts ] 
Multiple IR Seekers 
Author Message
Rookie

Joined: Wed Mar 31, 2010 4:43 pm
Posts: 12
Post 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
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: Multiple IR Seekers
Attach the program so we can see what is going on.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Apr 01, 2010 1:54 am
Profile WWW
Rookie

Joined: Wed Mar 31, 2010 4:43 pm
Posts: 12
Post Re: Multiple IR Seekers
Here's the code.


Attachments:
File comment: 2 Sensor Aiming Code
2IRsenseAim.c [2.51 KiB]
Downloaded 224 times
Thu Apr 01, 2010 4:05 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Apr 01, 2010 4:14 pm
Profile WWW
Rookie

Joined: Wed Mar 31, 2010 4:43 pm
Posts: 12
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.