Starting library to get the SI1143 Gesture Sensor to work. Currently only works in forced conversion mode.
Dependents: Gesture_Sensor Gesture_Arm_Robot mbed_gesture Gesture_Sensor_Sample ... more
Diff: SI1143.h
- Revision:
- 4:af8f820733e0
- Parent:
- 3:cb3e8160f18e
- Child:
- 5:3fadc61598bc
--- a/SI1143.h Thu Oct 17 22:03:54 2013 +0000 +++ b/SI1143.h Thu Oct 17 23:23:33 2013 +0000 @@ -178,23 +178,29 @@ SI1143(PinName sda, PinName scl); /** - * Sample the device and return a result. + * Takes a sample from the device and returns a raw output. * - * @param A value of 1 will output led1 - * A value of 2 will output led2 - * A value of 3 will output led3 - * A value of 4 will output ambient light - * A value of 5 will output infrared light - * A value of anything else will output 0 - * @return In forced conversion output mode, will display the raw output minus any baseline + * @param point Used to get a specific value from the device. + * A value of 1 will output proximity of led1, a value of 2 will output proximity of led2, + * a value of 3 will output proximity of led3, a value of 4 will output ambient light, + * a value of 5 will output infrared light, and any other value will output 0. + * @return In forced conversion output mode, will display a raw output minus any baseline, + * where as the greater the value, the closer the object is to the device + * (applies to proximity leds). */ int sample(int point); /** * Creates a baseline for sampling measurements. + * Should be done early in your code and after a reset. */ void bias(void); + /** + * Restarts the device. + */ + void restart(void); + private: I2C* i2c_;