NXC
Version 1.2.1 r5
|
Functions for accessing and modifying MindSensors devices. More...
Modules | |
MindSensors device constants | |
Constants that are for use with MindSensors devices. | |
Functions | |
void | SetSensorMSPressure (const byte &port) |
Configure a mindsensors pressure sensor. | |
void | SetSensorMSDROD (const byte &port, bool bActive) |
Configure a mindsensors DROD sensor. | |
void | SetSensorNXTSumoEyes (const byte &port, bool bLong) |
Configure a mindsensors SumoEyes sensor. | |
int | SensorMSPressure (const byte &port) |
Read mindsensors pressure sensor. | |
char | SensorNXTSumoEyes (const byte &port) |
Read mindsensors NXTSumoEyes obstacle zone. | |
int | SensorMSCompass (const byte &port, const byte i2caddr) |
Read mindsensors compass value. | |
int | SensorMSDROD (const byte &port) |
Read mindsensors DROD value. | |
int | SensorNXTSumoEyesRaw (const byte &port) |
Read mindsensors NXTSumoEyes raw value. | |
int | SensorMSPressureRaw (const byte &port) |
Read mindsensors raw pressure value. | |
bool | ReadSensorMSAccel (const byte port, const byte i2caddr, int &x, int &y, int &z) |
Read mindsensors acceleration values. | |
bool | ReadSensorMSPlayStation (const byte port, const byte i2caddr, byte &btnset1, byte &btnset2, byte &xleft, byte &yleft, byte &xright, byte &yright) |
Read mindsensors playstation controller values. | |
bool | ReadSensorMSRTClock (const byte port, byte &sec, byte &min, byte &hrs, byte &dow, byte &date, byte &month, byte &year) |
Read mindsensors RTClock values. | |
bool | ReadSensorMSTilt (const byte &port, const byte &i2caddr, byte &x, byte &y, byte &z) |
Read mindsensors tilt values. | |
bool | PFMateSend (const byte &port, const byte &i2caddr, const byte &channel, const byte &motors, const byte &cmdA, const byte &spdA, const byte &cmdB, const byte &spdB) |
Send PFMate command. | |
bool | PFMateSendRaw (const byte &port, const byte &i2caddr, const byte &channel, const byte &b1, const byte &b2) |
Send raw PFMate command. | |
int | MSReadValue (const byte port, const byte i2caddr, const byte reg, const byte numbytes) |
Read a mindsensors device value. | |
char | MSEnergize (const byte port, const byte i2caddr) |
Turn on power to device. | |
char | MSDeenergize (const byte port, const byte i2caddr) |
Turn off power to device. | |
char | MSADPAOn (const byte port, const byte i2caddr) |
Turn on mindsensors ADPA mode. | |
char | MSADPAOff (const byte port, const byte i2caddr) |
Turn off mindsensors ADPA mode. | |
char | DISTNxGP2D12 (const byte port, const byte i2caddr) |
Configure DISTNx as GP2D12. | |
char | DISTNxGP2D120 (const byte port, const byte i2caddr) |
Configure DISTNx as GP2D120. | |
char | DISTNxGP2YA02 (const byte port, const byte i2caddr) |
Configure DISTNx as GP2YA02. | |
char | DISTNxGP2YA21 (const byte port, const byte i2caddr) |
Configure DISTNx as GP2YA21. | |
int | DISTNxDistance (const byte port, const byte i2caddr) |
Read DISTNx distance value. | |
int | DISTNxMaxDistance (const byte port, const byte i2caddr) |
Read DISTNx maximum distance value. | |
int | DISTNxMinDistance (const byte port, const byte i2caddr) |
Read DISTNx minimum distance value. | |
byte | DISTNxModuleType (const byte port, const byte i2caddr) |
Read DISTNx module type value. | |
byte | DISTNxNumPoints (const byte port, const byte i2caddr) |
Read DISTNx num points value. | |
int | DISTNxVoltage (const byte port, const byte i2caddr) |
Read DISTNx voltage value. | |
char | ACCLNxCalibrateX (const byte port, const byte i2caddr) |
Calibrate ACCL-Nx X-axis. | |
char | ACCLNxCalibrateXEnd (const byte port, const byte i2caddr) |
Stop calibrating ACCL-Nx X-axis. | |
char | ACCLNxCalibrateY (const byte port, const byte i2caddr) |
Calibrate ACCL-Nx Y-axis. | |
char | ACCLNxCalibrateYEnd (const byte port, const byte i2caddr) |
Stop calibrating ACCL-Nx Y-axis. | |
char | ACCLNxCalibrateZ (const byte port, const byte i2caddr) |
Calibrate ACCL-Nx Z-axis. | |
char | ACCLNxCalibrateZEnd (const byte port, const byte i2caddr) |
Stop calibrating ACCL-Nx Z-axis. | |
char | ACCLNxResetCalibration (const byte port, const byte i2caddr) |
Reset ACCL-Nx calibration. | |
char | SetACCLNxSensitivity (const byte port, const byte i2caddr, byte slevel) |
Set ACCL-Nx sensitivity. | |
byte | ACCLNxSensitivity (const byte port, const byte i2caddr) |
Read ACCL-Nx sensitivity value. | |
int | ACCLNxXOffset (const byte port, const byte i2caddr) |
Read ACCL-Nx X offset value. | |
int | ACCLNxXRange (const byte port, const byte i2caddr) |
Read ACCL-Nx X range value. | |
int | ACCLNxYOffset (const byte port, const byte i2caddr) |
Read ACCL-Nx Y offset value. | |
int | ACCLNxYRange (const byte port, const byte i2caddr) |
Read ACCL-Nx Y range value. | |
int | ACCLNxZOffset (const byte port, const byte i2caddr) |
Read ACCL-Nx Z offset value. | |
int | ACCLNxZRange (const byte port, const byte i2caddr) |
Read ACCL-Nx Z range value. | |
char | PSPNxDigital (const byte &port, const byte &i2caddr) |
Configure PSPNx in digital mode. | |
char | PSPNxAnalog (const byte &port, const byte &i2caddr) |
Configure PSPNx in analog mode. | |
unsigned int | NXTServoPosition (const byte &port, const byte &i2caddr, const byte servo) |
Read NXTServo servo position value. | |
byte | NXTServoSpeed (const byte &port, const byte &i2caddr, const byte servo) |
Read NXTServo servo speed value. | |
byte | NXTServoBatteryVoltage (const byte &port, const byte &i2caddr) |
Read NXTServo battery voltage value. | |
char | SetNXTServoSpeed (const byte &port, const byte &i2caddr, const byte servo, const byte &speed) |
Set NXTServo servo motor speed. | |
char | SetNXTServoQuickPosition (const byte &port, const byte &i2caddr, const byte servo, const byte &qpos) |
Set NXTServo servo motor quick position. | |
char | SetNXTServoPosition (const byte &port, const byte &i2caddr, const byte servo, const byte &pos) |
Set NXTServo servo motor position. | |
char | NXTServoReset (const byte &port, const byte &i2caddr) |
Reset NXTServo properties. | |
char | NXTServoHaltMacro (const byte &port, const byte &i2caddr) |
Halt NXTServo macro. | |
char | NXTServoResumeMacro (const byte &port, const byte &i2caddr) |
Resume NXTServo macro. | |
char | NXTServoPauseMacro (const byte &port, const byte &i2caddr) |
Pause NXTServo macro. | |
char | NXTServoInit (const byte &port, const byte &i2caddr, const byte servo) |
Initialize NXTServo servo properties. | |
char | NXTServoGotoMacroAddress (const byte &port, const byte &i2caddr, const byte ¯o) |
Goto NXTServo macro address. | |
char | NXTServoEditMacro (const byte &port, const byte &i2caddr) |
Edit NXTServo macro. | |
char | NXTServoQuitEdit (const byte &port) |
Quit NXTServo macro edit mode. | |
char | NXTHIDAsciiMode (const byte &port, const byte &i2caddr) |
Set NXTHID into ASCII data mode. | |
char | NXTHIDDirectMode (const byte &port, const byte &i2caddr) |
Set NXTHID into direct data mode. | |
char | NXTHIDTransmit (const byte &port, const byte &i2caddr) |
Transmit NXTHID character. | |
char | NXTHIDLoadCharacter (const byte &port, const byte &i2caddr, const byte &modifier, const byte &character) |
Load NXTHID character. | |
char | NXTPowerMeterResetCounters (const byte &port, const byte &i2caddr) |
Reset NXTPowerMeter counters. | |
int | NXTPowerMeterPresentCurrent (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter present current. | |
int | NXTPowerMeterPresentVoltage (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter present voltage. | |
int | NXTPowerMeterCapacityUsed (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter capacity used. | |
int | NXTPowerMeterPresentPower (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter present power. | |
long | NXTPowerMeterTotalPowerConsumed (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter total power consumed. | |
int | NXTPowerMeterMaxCurrent (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter maximum current. | |
int | NXTPowerMeterMinCurrent (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter minimum current. | |
int | NXTPowerMeterMaxVoltage (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter maximum voltage. | |
int | NXTPowerMeterMinVoltage (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter minimum voltage. | |
long | NXTPowerMeterElapsedTime (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter elapsed time. | |
int | NXTPowerMeterErrorCount (const byte &port, const byte &i2caddr) |
Read NXTPowerMeter error count. | |
char | NXTLineLeaderPowerDown (const byte &port, const byte &i2caddr) |
Powerdown NXTLineLeader device. | |
char | NXTLineLeaderPowerUp (const byte &port, const byte &i2caddr) |
Powerup NXTLineLeader device. | |
char | NXTLineLeaderInvert (const byte &port, const byte &i2caddr) |
Invert NXTLineLeader colors. | |
char | NXTLineLeaderReset (const byte &port, const byte &i2caddr) |
Reset NXTLineLeader color inversion. | |
char | NXTLineLeaderSnapshot (const byte &port, const byte &i2caddr) |
Take NXTLineLeader line snapshot. | |
char | NXTLineLeaderCalibrateWhite (const byte &port, const byte &i2caddr) |
Calibrate NXTLineLeader white color. | |
char | NXTLineLeaderCalibrateBlack (const byte &port, const byte &i2caddr) |
Calibrate NXTLineLeader black color. | |
char | NXTLineLeaderSteering (const byte &port, const byte &i2caddr) |
Read NXTLineLeader steering. | |
char | NXTLineLeaderAverage (const byte &port, const byte &i2caddr) |
Read NXTLineLeader average. | |
byte | NXTLineLeaderResult (const byte &port, const byte &i2caddr) |
Read NXTLineLeader result. | |
char | SetNXTLineLeaderSetpoint (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader setpoint. | |
char | SetNXTLineLeaderKpValue (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader Kp value. | |
char | SetNXTLineLeaderKiValue (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader Ki value. | |
char | SetNXTLineLeaderKdValue (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader Kd value. | |
char | SetNXTLineLeaderKpFactor (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader Kp factor. | |
char | SetNXTLineLeaderKiFactor (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader Ki factor. | |
char | SetNXTLineLeaderKdFactor (const byte &port, const byte &i2caddr, const byte &value) |
Write NXTLineLeader Kd factor. | |
char | NRLink2400 (const byte port, const byte i2caddr) |
Configure NRLink in 2400 baud mode. | |
char | NRLink4800 (const byte port, const byte i2caddr) |
Configure NRLink in 4800 baud mode. | |
char | NRLinkFlush (const byte port, const byte i2caddr) |
Flush NRLink buffers. | |
char | NRLinkIRLong (const byte port, const byte i2caddr) |
Configure NRLink in IR long mode. | |
char | NRLinkIRShort (const byte port, const byte i2caddr) |
Configure NRLink in IR short mode. | |
char | NRLinkSetPF (const byte port, const byte i2caddr) |
Configure NRLink in power function mode. | |
char | NRLinkSetRCX (const byte port, const byte i2caddr) |
Configure NRLink in RCX mode. | |
char | NRLinkSetTrain (const byte port, const byte i2caddr) |
Configure NRLink in IR train mode. | |
char | NRLinkTxRaw (const byte port, const byte i2caddr) |
Configure NRLink in raw IR transmit mode. | |
byte | NRLinkStatus (const byte port, const byte i2caddr) |
Read NRLink status. | |
char | RunNRLinkMacro (const byte port, const byte i2caddr, const byte macro) |
Run NRLink macro. | |
char | WriteNRLinkBytes (const byte port, const byte i2caddr, const byte data[]) |
Write data to NRLink. | |
bool | ReadNRLinkBytes (const byte port, const byte i2caddr, byte &data[]) |
Read data from NRLink. | |
char | MSIRTrain (const byte port, const byte i2caddr, const byte channel, const byte func) |
MSIRTrain function. | |
char | MSPFComboDirect (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb) |
MSPFComboDirect function. | |
char | MSPFComboPWM (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb) |
MSPFComboPWM function. | |
char | MSPFRawOutput (const byte port, const byte i2caddr, const byte nibble0, const byte nibble1, const byte nibble2) |
MSPFRawOutput function. | |
char | MSPFRepeat (const byte port, const byte i2caddr, const byte count, const unsigned int delay) |
MSPFRepeat function. | |
char | MSPFSingleOutputCST (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func) |
MSPFSingleOutputCST function. | |
char | MSPFSingleOutputPWM (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func) |
MSPFSingleOutputPWM function. | |
char | MSPFSinglePin (const byte port, const byte i2caddr, const byte channel, const byte out, const byte pin, const byte func, bool cont) |
MSPFSinglePin function. | |
char | MSPFTrain (const byte port, const byte i2caddr, const byte channel, const byte func) |
MSPFTrain function. | |
void | MSRCXSetNRLinkPort (const byte port, const byte i2caddr) |
MSRCXSetIRLinkPort function. | |
int | MSRCXBatteryLevel (void) |
MSRCXBatteryLevel function. | |
int | MSRCXPoll (const byte src, const byte value) |
MSRCXPoll function. | |
int | MSRCXPollMemory (const unsigned int address) |
MSRCXPollMemory function. | |
void | MSRCXAbsVar (const byte varnum, const byte byte src, const unsigned int value) |
MSRCXAbsVar function. | |
void | MSRCXAddToDatalog (const byte src, const unsigned int value) |
MSRCXAddToDatalog function. | |
void | MSRCXAndVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXAndVar function. | |
void | MSRCXBoot (void) |
MSRCXBoot function. | |
void | MSRCXCalibrateEvent (const byte evt, const byte low, const byte hi, const byte hyst) |
MSRCXCalibrateEvent function. | |
void | MSRCXClearAllEvents (void) |
MSRCXClearAllEvents function. | |
void | MSRCXClearCounter (const byte counter) |
MSRCXClearCounter function. | |
void | MSRCXClearMsg (void) |
MSRCXClearMsg function. | |
void | MSRCXClearSensor (const byte port) |
MSRCXClearSensor function. | |
void | MSRCXClearSound (void) |
MSRCXClearSound function. | |
void | MSRCXClearTimer (const byte timer) |
MSRCXClearTimer function. | |
void | MSRCXCreateDatalog (const unsigned int size) |
MSRCXCreateDatalog function. | |
void | MSRCXDecCounter (const byte counter) |
MSRCXDecCounter function. | |
void | MSRCXDeleteSub (const byte s) |
MSRCXDeleteSub function. | |
void | MSRCXDeleteSubs (void) |
MSRCXDeleteSubs function. | |
void | MSRCXDeleteTask (const byte t) |
MSRCXDeleteTask function. | |
void | MSRCXDeleteTasks (void) |
MSRCXDeleteTasks function. | |
void | MSRCXDisableOutput (const byte outputs) |
MSRCXDisableOutput function. | |
void | MSRCXDivVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXDivVar function. | |
void | MSRCXEnableOutput (const byte outputs) |
MSRCXEnableOutput function. | |
void | MSRCXEvent (const byte src, const unsigned int value) |
MSRCXEvent function. | |
void | MSRCXFloat (const byte outputs) |
MSRCXFloat function. | |
void | MSRCXFwd (const byte outputs) |
MSRCXFwd function. | |
void | MSRCXIncCounter (const byte counter) |
MSRCXIncCounter function. | |
void | MSRCXInvertOutput (const byte outputs) |
MSRCXInvertOutput function. | |
void | MSRCXMulVar (const byte varnum, const byte src, unsigned int value) |
MSRCXMulVar function. | |
void | MSRCXMuteSound (void) |
MSRCXMuteSound function. | |
void | MSRCXObvertOutput (const byte outputs) |
MSRCXObvertOutput function. | |
void | MSRCXOff (const byte outputs) |
MSRCXOff function. | |
void | MSRCXOn (const byte outputs) |
MSRCXOn function. | |
void | MSRCXOnFor (const byte outputs, const unsigned int ms) |
MSRCXOnFor function. | |
void | MSRCXOnFwd (const byte outputs) |
MSRCXOnFwd function. | |
void | MSRCXOnRev (const byte outputs) |
MSRCXOnRev function. | |
void | MSRCXOrVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXOrVar function. | |
void | MSRCXPBTurnOff (void) |
MSRCXPBTurnOff function. | |
void | MSRCXPing (void) |
MSRCXPing function. | |
void | MSRCXPlaySound (const byte snd) |
MSRCXPlaySound function. | |
void | MSRCXPlayTone (const unsigned int freq, const byte duration) |
MSRCXPlayTone function. | |
void | MSRCXPlayToneVar (const byte varnum, const byte duration) |
MSRCXPlayToneVar function. | |
void | MSRCXRemote (unsigned int cmd) |
MSRCXRemote function. | |
void | MSRCXReset (void) |
MSRCXReset function. | |
void | MSRCXRev (const byte outputs) |
MSRCXRev function. | |
void | MSRCXSelectDisplay (const byte src, const unsigned int value) |
MSRCXSelectDisplay function. | |
void | MSRCXSelectProgram (const byte prog) |
MSRCXSelectProgram function. | |
void | MSRCXSendSerial (const byte first, const byte count) |
MSRCXSendSerial function. | |
void | MSRCXSet (const byte dstsrc, const byte dstval, const byte src, unsigned int value) |
MSRCXSet function. | |
void | MSRCXSetDirection (const byte outputs, const byte dir) |
MSRCXSetDirection function. | |
void | MSRCXSetEvent (const byte evt, const byte src, const byte type) |
MSRCXSetEvent function. | |
void | MSRCXSetGlobalDirection (const byte outputs, const byte dir) |
MSRCXSetGlobalDirection function. | |
void | MSRCXSetGlobalOutput (const byte outputs, const byte mode) |
MSRCXSetGlobalOutput function. | |
void | MSRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval) |
MSRCXSetMaxPower function. | |
void | MSRCXSetMessage (const byte msg) |
MSRCXSetMessage function. | |
void | MSRCXSetOutput (const byte outputs, const byte mode) |
MSRCXSetOutput function. | |
void | MSRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval) |
MSRCXSetPower function. | |
void | MSRCXSetPriority (const byte p) |
MSRCXSetPriority function. | |
void | MSRCXSetSensorMode (const byte port, const byte mode) |
MSRCXSetSensorMode function. | |
void | MSRCXSetSensorType (const byte port, const byte type) |
MSRCXSetSensorType function. | |
void | MSRCXSetSleepTime (const byte t) |
MSRCXSetSleepTime function. | |
void | MSRCXSetTxPower (const byte pwr) |
MSRCXSetTxPower function. | |
void | MSRCXSetUserDisplay (const byte src, const unsigned int value, const byte precision) |
MSRCXSetUserDisplay function. | |
void | MSRCXSetVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXSetVar function. | |
void | MSRCXSetWatch (const byte hours, const byte minutes) |
MSRCXSetWatch function. | |
void | MSRCXSgnVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXSgnVar function. | |
void | MSRCXStartTask (const byte t) |
MSRCXStartTask function. | |
void | MSRCXStopAllTasks (void) |
MSRCXStopAllTasks function. | |
void | MSRCXStopTask (const byte t) |
MSRCXStopTask function. | |
void | MSRCXSubVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXSubVar function. | |
void | MSRCXSumVar (const byte varnum, const byte src, const unsigned int value) |
MSRCXSumVar function. | |
void | MSRCXToggle (const byte outputs) |
MSRCXToggle function. | |
void | MSRCXUnlock (void) |
MSRCXUnlock function. | |
void | MSRCXUnmuteSound (void) |
MSRCXUnmuteSound function. | |
void | MSScoutCalibrateSensor (void) |
MSScoutCalibrateSensor function. | |
void | MSScoutMuteSound (void) |
MSScoutMuteSound function. | |
void | MSScoutSelectSounds (const byte grp) |
MSScoutSelectSounds function. | |
void | MSScoutSendVLL (const byte src, const unsigned int value) |
MSScoutSendVLL function. | |
void | MSScoutSetCounterLimit (const byte ctr, const byte src, const unsigned int value) |
MSScoutSetCounterLimit function. | |
void | MSScoutSetEventFeedback (const byte src, const unsigned int value) |
MSScoutSetEventFeedback function. | |
void | MSScoutSetLight (const byte x) |
MSScoutSetLight function. | |
void | MSScoutSetScoutMode (const byte mode) |
MSScoutSetScoutMode function. | |
void | MSScoutSetScoutRules (const byte m, const byte t, const byte l, const byte tm, const byte fx) |
MSScoutSetScoutRules function. | |
void | MSScoutSetSensorClickTime (const byte src, const unsigned int value) |
MSScoutSetSensorClickTime function. | |
void | MSScoutSetSensorHysteresis (const byte src, const unsigned int value) |
MSScoutSetSensorHysteresis function. | |
void | MSScoutSetSensorLowerLimit (const byte src, const unsigned int value) |
MSScoutSetSensorLowerLimit function. | |
void | MSScoutSetSensorUpperLimit (const byte src, const unsigned int value) |
MSScoutSetSensorUpperLimit function. | |
void | MSScoutSetTimerLimit (const byte tmr, const byte src, const unsigned int value) |
MSScoutSetTimerLimit function. | |
void | MSScoutUnmuteSound (void) |
MSScoutUnmuteSound function. | |
Functions for accessing and modifying MindSensors devices.