|
SMUX driver for the Lego US sensor. More...
#include "common.h"
Go to the source code of this file.
Defines | |
#define | LEGOUS_I2C_ADDR 0x02 |
#define | LEGOUS_REG_CMD 0x41 |
#define | LEGOUS_REG_DATA 0x42 |
#define | LEGOUS_CMD_OFF 0x00 |
#define | LEGOUS_CMD_SSHOT 0x01 |
#define | LEGOUS_CMD_CONT 0x02 |
#define | LEGOUS_CMD_ECAPT 0x03 |
#define | LEGOUS_CMD_RST 0x04 |
Functions | |
int | USreadDist (tSensors link) |
bool | USreadDistances (tSensors link, tByteArray &distances) |
bool | _USsendCmd (tSensors link, ubyte command) |
bool | USsetSingleMode (tSensors link) |
bool | USsetContinuousMode (tSensors link) |
bool | USsetOff (tSensors link) |
bool | USsetEventCapture (tSensors link) |
bool | USreset (tSensors link) |
int | USreadDist (tMUXSensor muxsensor) |
Variables | |
tConfigParams | LEGOUS_config = {HTSMUX_CHAN_I2C + HTSMUX_CHAN_9V + HTSMUX_CHAN_I2C_SLOW, 1, 0x02, 0x42} |
tByteArray | LEGOUS_I2CRequest |
tByteArray | LEGOUS_I2CReply |
SMUX driver for the Lego US sensor.
lego-ultrasound.h provides an API for the Lego US driver.
License: You may use this code as you wish, provided you give credit where its due. THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.
Changelog:
Definition in file lego-ultrasound.h.