NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
Input module functions

Functions for accessing and modifying input module features. More...

Modules

 Basic analog sensor value names
 Read analog sensor values using these names.
 

Functions

void SetSensorType (const byte &port, byte type)
 Set sensor type.
 
void SetSensorMode (const byte &port, byte mode)
 Set sensor mode.
 
void ClearSensor (const byte &port)
 Clear a sensor value.
 
void ResetSensor (const byte &port)
 Reset the sensor port.
 
void SetSensor (const byte &port, const unsigned int config)
 Set sensor configuration.
 
void SetSensorTouch (const byte &port)
 Configure a touch sensor.
 
void SetSensorLight (const byte &port, bool bActive=true)
 Configure a light sensor.
 
void SetSensorSound (const byte &port, bool bdBScaling=true)
 Configure a sound sensor.
 
void SetSensorLowspeed (const byte &port, bool bIsPowered=true)
 Configure an I2C sensor.
 
void SetSensorUltrasonic (const byte &port)
 Configure an ultrasonic sensor.
 
void SetSensorEMeter (const byte &port)
 Configure an EMeter sensor.
 
void SetSensorTemperature (const byte &port)
 Configure a temperature sensor.
 
void SetSensorColorFull (const byte &port)
 Configure an NXT 2.0 full color sensor.
 
void SetSensorColorRed (const byte &port)
 Configure an NXT 2.0 red light sensor.
 
void SetSensorColorGreen (const byte &port)
 Configure an NXT 2.0 green light sensor.
 
void SetSensorColorBlue (const byte &port)
 Configure an NXT 2.0 blue light sensor.
 
void SetSensorColorNone (const byte &port)
 Configure an NXT 2.0 no light sensor.
 
variant GetInput (const byte &port, const byte field)
 Get an input field value.
 
void SetInput (const byte &port, const int field, variant value)
 Set an input field value.
 
unsigned int Sensor (const byte &port)
 Read sensor scaled value.
 
bool SensorBoolean (const byte port)
 Read sensor boolean value.
 
byte SensorDigiPinsDirection (const byte port)
 Read sensor digital pins direction.
 
byte SensorDigiPinsOutputLevel (const byte port)
 Read sensor digital pins output level.
 
byte SensorDigiPinsStatus (const byte port)
 Read sensor digital pins status.
 
bool SensorInvalid (const byte &port)
 Read sensor invalid data flag.
 
byte SensorMode (const byte &port)
 Read sensor mode.
 
unsigned int SensorNormalized (const byte &port)
 Read sensor normalized value.
 
unsigned int SensorRaw (const byte &port)
 Read sensor raw value.
 
unsigned int SensorScaled (const byte &port)
 Read sensor scaled value.
 
byte SensorType (const byte &port)
 Read sensor type.
 
unsigned int SensorValue (const byte &port)
 Read sensor scaled value.
 
bool SensorValueBool (const byte port)
 Read sensor boolean value.
 
unsigned int SensorValueRaw (const byte &port)
 Read sensor raw value.
 
byte CustomSensorActiveStatus (byte port)
 Get the custom sensor active status.
 
byte CustomSensorPercentFullScale (byte port)
 Get the custom sensor percent full scale.
 
unsigned int CustomSensorZeroOffset (byte port)
 Get the custom sensor zero offset.
 
void SetCustomSensorActiveStatus (byte port, byte activeStatus)
 Set active status.
 
void SetCustomSensorPercentFullScale (byte port, byte pctFullScale)
 Set percent full scale.
 
void SetCustomSensorZeroOffset (byte port, int zeroOffset)
 Set custom zero offset.
 
void SetSensorBoolean (byte port, bool value)
 Set sensor boolean value.
 
void SetSensorDigiPinsDirection (byte port, byte direction)
 Set digital pins direction.
 
void SetSensorDigiPinsOutputLevel (byte port, byte outputLevel)
 Set digital pins output level.
 
void SetSensorDigiPinsStatus (byte port, byte status)
 Set digital pins status.
 
void SysColorSensorRead (ColorSensorReadType &args)
 Read LEGO color sensor.
 
int ReadSensorColorEx (const byte &port, int &colorval, unsigned int &raw[], unsigned int &norm[], int &scaled[])
 Read LEGO color sensor extra.
 
int ReadSensorColorRaw (const byte &port, unsigned int &rawVals[])
 Read LEGO color sensor raw values.
 
unsigned int ColorADRaw (byte port, byte color)
 Read a LEGO color sensor AD raw value.
 
bool ColorBoolean (byte port, byte color)
 Read a LEGO color sensor boolean value.
 
long ColorCalibration (byte port, byte point, byte color)
 Read a LEGO color sensor calibration point value.
 
byte ColorCalibrationState (byte port)
 Read LEGO color sensor calibration state.
 
unsigned int ColorCalLimits (byte port, byte point)
 Read a LEGO color sensor calibration limit value.
 
unsigned int ColorSensorRaw (byte port, byte color)
 Read a LEGO color sensor raw value.
 
unsigned int ColorSensorValue (byte port, byte color)
 Read a LEGO color sensor scaled value.
 
void SysInputPinFunction (InputPinFunctionType &args)
 Execute the Input module pin function.
 

Detailed Description

Functions for accessing and modifying input module features.