View unanswered posts | View active topics It is currently Sun Jul 05, 2020 7:48 am

Reply to topic  [ 3 posts ] 
sensorHiTechnicIRSeeker1200 or sensorI2CCustom in Pragma 
Author Message

Joined: Mon Nov 18, 2013 4:18 pm
Posts: 2
Post sensorHiTechnicIRSeeker1200 or sensorI2CCustom in Pragma
We are using:
Version 3.62 of RobotC
Xander's latest (as of 11/17/2013) #include drivers\hitechnic-irseeker-v2.h from
HiTechnic IrSeeker V2 hardware

the sample code provided (hitechnic-irseeker-v2-enhanced-test1.c) starts like this:
#pragma config(Sensor, S1, HTIRS2, sensorI2CCustom)

Our RobotC generates this:
#pragma config(Sensor, S1, HTIRS2, sensorHiTechnicIRSeeker1200)

Can anyone tell me what the difference is? Do we care? Is there a "right" way?

We plan on using the HTIRS2readEnhanced and HTIRS2readACDir functions to get signal strength and direction.

While we are on the topic, what is the difference between HTIRS2readACDir(HTIRS2, int value) and int value = SensorValue[HTIRS]?


FTC Team Mentor - 6699 - Tempest

Mon Nov 18, 2013 4:46 pm

Joined: Mon Nov 18, 2013 4:18 pm
Posts: 2
Post Re: sensorHiTechnicIRSeeker1200 or sensorI2CCustom in Pragma
Sorry... as a follow up the compiler does not seem to care but when we try and use HTIRS2readEnhanced in the Virtual Robot World (Block Party) we get:

ROBOTC Exception Violation Report

Byte Cote Interpreter Exception:
Program Slot: 0, Task ID: main[0]
Error at PC: waitForI2CBus+0x0008
Task PC: Task:main+0x000
Task State: 'Exception'
Exception Type: 'Property not supported by emulator(77)'

So it looks to me like the function is not supported natively in the VW. It there a work around or other function to get the signal strength information?

Mon Nov 18, 2013 9:11 pm
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: sensorHiTechnicIRSeeker1200 or sensorI2CCustom in Pragma
Don't use the built-in drivers (sensorHiTechnicIRSeeker1200) with my drivers, it's one or the other. Take another good look at the examples that come with the driver suite, in particular the pragmas, you'll see what you need to do.

I also have a tutorial on this stuff here:, it explains what you have to do to get your pragmas right as 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]

Tue Nov 19, 2013 3:14 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.