Configure an I2C sensor.
Configure the sensor on the specified port as an I2C digital sensor for either powered (9 volt) or unpowered devices.
- Parameters
-
port | The port to configure. See Input port constants. |
bIsPowered | A boolean flag indicating whether to configure the port for powered or unpowered I2C devices. The default value for this optional parameter is true. |
- Examples:
- ex_digps.nxc, ex_HTRCXSetIRLinkPort.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_PFMate.nxc, ex_proto.nxc, ex_ReadSensorHTAccel.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTBarometric.nxc, ex_ReadSensorMSPlayStation.nxc, ex_ResetSensorHTAngle.nxc, ex_SetSensorLowspeed.nxc, ex_superpro.nxc, and ex_xg1300.nxc.