ROBOTC.net forums
http://www.robotc.net/forums/

sensorHiTechnicIRSeeker1200 or sensorI2CCustom in Pragma
http://www.robotc.net/forums/viewtopic.php?f=41&t=7315
Page 1 of 1

Author:  stevec [ Mon Nov 18, 2013 4:46 pm ]
Post subject:  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 botbench.com/blog/robotc-driver-suite
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]?

Thanks,

Steve
FTC Team Mentor - 6699 - Tempest

Author:  stevec [ Mon Nov 18, 2013 9:11 pm ]
Post subject:  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?

Author:  mightor [ Tue Nov 19, 2013 3:14 am ]
Post subject:  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: http://botbench.com/blog/robotc-driver-suite/, it explains what you have to do to get your pragmas right as well.

= Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/