NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
HiTechnic API Functions

Functions for accessing and modifying HiTechnic devices. More...

Modules

 HiTechnic device constants
 Constants that are for use with HiTechnic devices.
 

Functions

void SetSensorHTGyro (const byte &port)
 Set sensor as HiTechnic Gyro.
 
void SetSensorHTMagnet (const byte &port)
 Set sensor as HiTechnic Magnet.
 
void SetSensorHTEOPD (const byte &port, bool bStandard=true)
 Set sensor as HiTechnic EOPD.
 
void SetSensorHTForce (const byte &port)
 Set sensor as HiTechnic Force.
 
int SensorHTGyro (const byte &port, int offset=0)
 Read HiTechnic Gyro sensor.
 
int SensorHTMagnet (const byte &port, int offset=0)
 Read HiTechnic Magnet sensor.
 
int SensorHTEOPD (const byte &port)
 Read HiTechnic EOPD sensor.
 
int SensorHTForce (const byte &port)
 Read HiTechnic Force sensor.
 
int SensorHTColorNum (const byte &port)
 Read HiTechnic color sensor color number.
 
int SensorHTCompass (const byte &port)
 Read HiTechnic compass.
 
int SensorHTIRSeekerDir (const byte &port)
 Read HiTechnic IRSeeker direction.
 
int SensorHTIRSeeker2Addr (const byte &port, const byte reg)
 Read HiTechnic IRSeeker2 register.
 
int SensorHTIRSeeker2DCDir (const byte &port)
 Read HiTechnic IRSeeker2 DC direction.
 
int SensorHTIRSeeker2ACDir (const byte &port)
 Read HiTechnic IRSeeker2 AC direction.
 
char SetHTColor2Mode (const byte &port, byte mode)
 Set HiTechnic Color2 mode.
 
char SetHTIRSeeker2Mode (const byte &port, const byte mode)
 Set HiTechnic IRSeeker2 mode.
 
bool ReadSensorHTAccel (const byte port, int &x, int &y, int &z)
 Read HiTechnic acceleration values.
 
bool ReadSensorHTColor (const byte port, byte &ColorNum, byte &Red, byte &Green, byte &Blue)
 Read HiTechnic Color values.
 
bool ReadSensorHTIRSeeker (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9)
 Read HiTechnic IRSeeker values.
 
bool ReadSensorHTNormalizedColor (const byte port, byte &ColorIdx, byte &Red, byte &Green, byte &Blue)
 Read HiTechnic Color normalized values.
 
bool ReadSensorHTRawColor (const byte port, unsigned int &Red, unsigned int &Green, unsigned int &Blue)
 Read HiTechnic Color raw values.
 
bool ReadSensorHTColor2Active (byte port, byte &ColorNum, byte &Red, byte &Green, byte &Blue, byte &White)
 Read HiTechnic Color2 active values.
 
bool ReadSensorHTNormalizedColor2Active (const byte port, byte &ColorIdx, byte &Red, byte &Green, byte &Blue)
 Read HiTechnic Color2 normalized active values.
 
bool ReadSensorHTRawColor2 (const byte port, unsigned int &Red, unsigned int &Green, unsigned int &Blue, unsigned int &White)
 Read HiTechnic Color2 raw values.
 
bool ReadSensorHTIRReceiver (const byte port, char &pfdata[])
 Read HiTechnic IRReceiver Power Function bytes.
 
bool ReadSensorHTIRReceiverEx (const byte port, const byte offset, char &pfchar)
 Read HiTechnic IRReceiver Power Function value.
 
bool ReadSensorHTIRSeeker2AC (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9)
 Read HiTechnic IRSeeker2 AC values.
 
bool ReadSensorHTIRSeeker2DC (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9, byte &avg)
 Read HiTechnic IRSeeker2 DC values.
 
char ResetSensorHTAngle (const byte port, const byte mode)
 Reset HiTechnic Angle sensor.
 
bool ReadSensorHTAngle (const byte port, int &Angle, long &AccAngle, int &RPM)
 Read HiTechnic Angle sensor values.
 
bool ResetHTBarometricCalibration (byte port)
 Reset HiTechnic Barometric sensor calibration.
 
bool SetHTBarometricCalibration (byte port, unsigned int cal)
 Set HiTechnic Barometric sensor calibration.
 
bool ReadSensorHTBarometric (const byte port, int &temp, unsigned int &press)
 Read HiTechnic Barometric sensor values.
 
int SensorHTProtoAnalog (const byte port, const byte input)
 Read HiTechnic Prototype board analog input value.
 
bool ReadSensorHTProtoAllAnalog (const byte port, int &a0, int &a1, int &a2, int &a3, int &a4)
 Read all HiTechnic Prototype board analog input values.
 
bool SetSensorHTProtoDigitalControl (const byte port, byte value)
 Control HiTechnic Prototype board digital pin direction.
 
byte SensorHTProtoDigitalControl (const byte port)
 Read HiTechnic Prototype board digital control values.
 
bool SetSensorHTProtoDigital (const byte port, byte value)
 Set HiTechnic Prototype board digital output values.
 
byte SensorHTProtoDigital (const byte port)
 Read HiTechnic Prototype board digital input values.
 
int SensorHTSuperProAnalog (const byte port, const byte input)
 Read HiTechnic SuperPro board analog input value.
 
bool ReadSensorHTSuperProAllAnalog (const byte port, int &a0, int &a1, int &a2, int &a3)
 Read all HiTechnic SuperPro board analog input values.
 
bool SetSensorHTSuperProDigitalControl (const byte port, byte value)
 Control HiTechnic SuperPro board digital pin direction.
 
byte SensorHTSuperProDigitalControl (const byte port)
 Read HiTechnic SuperPro board digital control values.
 
bool SetSensorHTSuperProDigital (const byte port, byte value)
 Set HiTechnic SuperPro board digital output values.
 
byte SensorHTSuperProDigital (const byte port)
 Read HiTechnic SuperPro board digital input values.
 
bool SetSensorHTSuperProLED (const byte port, byte value)
 Set HiTechnic SuperPro LED value.
 
byte SensorHTSuperProLED (const byte port)
 Read HiTechnic SuperPro LED value.
 
bool SetSensorHTSuperProStrobe (const byte port, byte value)
 Set HiTechnic SuperPro strobe value.
 
byte SensorHTSuperProStrobe (const byte port)
 Read HiTechnic SuperPro strobe value.
 
bool SetSensorHTSuperProProgramControl (const byte port, byte value)
 Set HiTechnic SuperPro program control value.
 
byte SensorHTSuperProProgramControl (const byte port)
 Read HiTechnic SuperPro program control value.
 
bool SetSensorHTSuperProAnalogOut (const byte port, const byte dac, byte mode, int freq, int volt)
 Set HiTechnic SuperPro board analog output parameters.
 
bool ReadSensorHTSuperProAnalogOut (const byte port, const byte dac, byte &mode, int &freq, int &volt)
 Read HiTechnic SuperPro board analog output parameters.
 
bool SetSensorHTPIRDeadband (const byte port, byte value)
 Set HiTechnic PIR deadband value.
 
char SensorHTPIR (const byte port)
 Read HiTechnic PIR measurement value.
 
void ReadSensorHTTouchMultiplexer (const byte port, byte &t1, byte &t2, byte &t3, byte &t4)
 Read HiTechnic touch multiplexer.
 
char HTIRTrain (const byte port, const byte channel, const byte func)
 HTIRTrain function.
 
char HTPFComboDirect (const byte port, const byte channel, const byte outa, const byte outb)
 HTPFComboDirect function.
 
char HTPFComboPWM (const byte port, const byte channel, const byte outa, const byte outb)
 HTPFComboPWM function.
 
char HTPFRawOutput (const byte port, const byte nibble0, const byte nibble1, const byte nibble2)
 HTPFRawOutput function.
 
char HTPFRepeat (const byte port, const byte count, const unsigned int delay)
 HTPFRepeat function.
 
char HTPFSingleOutputCST (const byte port, const byte channel, const byte out, const byte func)
 HTPFSingleOutputCST function.
 
char HTPFSingleOutputPWM (const byte port, const byte channel, const byte out, const byte func)
 HTPFSingleOutputPWM function.
 
char HTPFSinglePin (const byte port, const byte channel, const byte out, const byte pin, const byte func, bool cont)
 HTPFSinglePin function.
 
char HTPFTrain (const byte port, const byte channel, const byte func)
 HTPFTrain function.
 
void HTRCXSetIRLinkPort (const byte port)
 HTRCXSetIRLinkPort function.
 
int HTRCXBatteryLevel (void)
 HTRCXBatteryLevel function.
 
int HTRCXPoll (const byte src, const byte value)
 HTRCXPoll function Send the Poll command to an RCX to read a signed 2-byte value at the specified source and value combination.
 
int HTRCXPollMemory (const unsigned int address)
 HTRCXPollMemory function.
 
void HTRCXAddToDatalog (const byte src, const unsigned int value)
 HTRCXAddToDatalog function.
 
void HTRCXClearAllEvents (void)
 HTRCXClearAllEvents function.
 
void HTRCXClearCounter (const byte counter)
 HTRCXClearCounter function.
 
void HTRCXClearMsg (void)
 HTRCXClearMsg function.
 
void HTRCXClearSensor (const byte port)
 HTRCXClearSensor function.
 
void HTRCXClearSound (void)
 HTRCXClearSound function.
 
void HTRCXClearTimer (const byte timer)
 HTRCXClearTimer function.
 
void HTRCXCreateDatalog (const unsigned int size)
 HTRCXCreateDatalog function.
 
void HTRCXDecCounter (const byte counter)
 HTRCXDecCounter function.
 
void HTRCXDeleteSub (const byte s)
 HTRCXDeleteSub function.
 
void HTRCXDeleteSubs (void)
 HTRCXDeleteSubs function.
 
void HTRCXDeleteTask (const byte t)
 HTRCXDeleteTask function.
 
void HTRCXDeleteTasks (void)
 HTRCXDeleteTasks function.
 
void HTRCXDisableOutput (const byte outputs)
 HTRCXDisableOutput function.
 
void HTRCXEnableOutput (const byte outputs)
 HTRCXEnableOutput function.
 
void HTRCXEvent (const byte src, const unsigned int value)
 HTRCXEvent function.
 
void HTRCXFloat (const byte outputs)
 HTRCXFloat function.
 
void HTRCXFwd (const byte outputs)
 HTRCXFwd function.
 
void HTRCXIncCounter (const byte counter)
 HTRCXIncCounter function.
 
void HTRCXInvertOutput (const byte outputs)
 HTRCXInvertOutput function.
 
void HTRCXMuteSound (void)
 HTRCXMuteSound function.
 
void HTRCXObvertOutput (const byte outputs)
 HTRCXObvertOutput function.
 
void HTRCXOff (const byte outputs)
 HTRCXOff function.
 
void HTRCXOn (const byte outputs)
 HTRCXOn function.
 
void HTRCXOnFor (const byte outputs, const unsigned int ms)
 HTRCXOnFor function.
 
void HTRCXOnFwd (const byte outputs)
 HTRCXOnFwd function.
 
void HTRCXOnRev (const byte outputs)
 HTRCXOnRev function.
 
void HTRCXPBTurnOff (void)
 HTRCXPBTurnOff function.
 
void HTRCXPing (void)
 HTRCXPing function.
 
void HTRCXPlaySound (const byte snd)
 HTRCXPlaySound function.
 
void HTRCXPlayTone (const unsigned int freq, const byte duration)
 HTRCXPlayTone function.
 
void HTRCXPlayToneVar (const byte varnum, const byte duration)
 HTRCXPlayToneVar function.
 
void HTRCXRemote (unsigned int cmd)
 HTRCXRemote function.
 
void HTRCXRev (const byte outputs)
 HTRCXRev function.
 
void HTRCXSelectDisplay (const byte src, const unsigned int value)
 HTRCXSelectDisplay function.
 
void HTRCXSelectProgram (const byte prog)
 HTRCXSelectProgram function.
 
void HTRCXSendSerial (const byte first, const byte count)
 HTRCXSendSerial function.
 
void HTRCXSetDirection (const byte outputs, const byte dir)
 HTRCXSetDirection function.
 
void HTRCXSetEvent (const byte evt, const byte src, const byte type)
 HTRCXSetEvent function.
 
void HTRCXSetGlobalDirection (const byte outputs, const byte dir)
 HTRCXSetGlobalDirection function.
 
void HTRCXSetGlobalOutput (const byte outputs, const byte mode)
 HTRCXSetGlobalOutput function.
 
void HTRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval)
 HTRCXSetMaxPower function.
 
void HTRCXSetMessage (const byte msg)
 HTRCXSetMessage function.
 
void HTRCXSetOutput (const byte outputs, const byte mode)
 HTRCXSetOutput function.
 
void HTRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval)
 HTRCXSetPower function.
 
void HTRCXSetPriority (const byte p)
 HTRCXSetPriority function.
 
void HTRCXSetSensorMode (const byte port, const byte mode)
 HTRCXSetSensorMode function.
 
void HTRCXSetSensorType (const byte port, const byte type)
 HTRCXSetSensorType function.
 
void HTRCXSetSleepTime (const byte t)
 HTRCXSetSleepTime function.
 
void HTRCXSetTxPower (const byte pwr)
 HTRCXSetTxPower function.
 
void HTRCXSetWatch (const byte hours, const byte minutes)
 HTRCXSetWatch function.
 
void HTRCXStartTask (const byte t)
 HTRCXStartTask function.
 
void HTRCXStopAllTasks (void)
 HTRCXStopAllTasks function.
 
void HTRCXStopTask (const byte t)
 HTRCXStopTask function.
 
void HTRCXToggle (const byte outputs)
 HTRCXToggle function.
 
void HTRCXUnmuteSound (void)
 HTRCXUnmuteSound function.
 
void HTScoutCalibrateSensor (void)
 HTScoutCalibrateSensor function.
 
void HTScoutMuteSound (void)
 HTScoutMuteSound function.
 
void HTScoutSelectSounds (const byte grp)
 HTScoutSelectSounds function.
 
void HTScoutSendVLL (const byte src, const unsigned int value)
 HTScoutSendVLL function.
 
void HTScoutSetEventFeedback (const byte src, const unsigned int value)
 HTScoutSetEventFeedback function.
 
void HTScoutSetLight (const byte x)
 HTScoutSetLight function.
 
void HTScoutSetScoutMode (const byte mode)
 HTScoutSetScoutMode function.
 
void HTScoutSetSensorClickTime (const byte src, const unsigned int value)
 HTScoutSetSensorClickTime function.
 
void HTScoutSetSensorHysteresis (const byte src, const unsigned int value)
 HTScoutSetSensorHysteresis function.
 
void HTScoutSetSensorLowerLimit (const byte src, const unsigned int value)
 HTScoutSetSensorLowerLimit function.
 
void HTScoutSetSensorUpperLimit (const byte src, const unsigned int value)
 HTScoutSetSensorUpperLimit function.
 
void HTScoutUnmuteSound (void)
 HTScoutUnmuteSound function.
 

Detailed Description

Functions for accessing and modifying HiTechnic devices.