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

Embed: (wiki syntax)

« Back to documentation index

SI1143 Class Reference

SI1143 Class Reference

Parallax SI1143 Gesture Sensor. More...

#include <SI1143.h>

Public Member Functions

 SI1143 (PinName sda, PinName scl)
 Constructor.
void restart (void)
 Restarts the device.
void bias (int ready, int repeat)
 Creates a baseline for sampling measurements.
int get_ps1 (int repeat)
 Takes a number of samples from the proximity of led1 and returns a raw output.
int get_ps2 (int repeat)
 Takes a number of samples from the proximity of led2 and returns a raw output.
int get_ps3 (int repeat)
 Takes a number of samples from the proximity of led3 and returns a raw output.
int get_vis (int repeat)
 Takes a number of samples for ambient light on device and returns a raw output.
int get_ir (int repeat)
 Takes a number of samples for infrared light on device and returns a raw output.

Detailed Description

Parallax SI1143 Gesture Sensor.

Definition at line 168 of file SI1143.h.


Constructor & Destructor Documentation

SI1143 ( PinName  sda,
PinName  scl 
)

Constructor.

Parameters:
sdambed pin to use for SDA line of I2C interface.
sclmbed pin to use for SCL line of I2C interface.
Author:
Guillermo A Torijano

LICENSE

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DESCRIPTION

Parallax SI1143 Gesture Sensor.

Datasheet:

http://www.silabs.com/Support%20Documents/TechnicalDocs/Si114x.pdf

Definition at line 35 of file SI1143.cpp.


Member Function Documentation

void bias ( int  ready,
int  repeat 
)

Creates a baseline for sampling measurements.

Should be done early in your code and after a reset.

Parameters:
readyTells how many seconds to wait before getting samples from the device.
repeatTells how many samples to get from each leds on the device. Each repeat takes 12 ms.

Definition at line 112 of file SI1143.cpp.

int get_ir ( int  repeat )

Takes a number of samples for infrared light on device and returns a raw output.

Parameters:
repeatTells how many samples to get from the device. Each sample takes 4 ms.
Returns:
In forced conversion output mode, will display a raw output of the average sample.

Definition at line 203 of file SI1143.cpp.

int get_ps1 ( int  repeat )

Takes a number of samples from the proximity of led1 and returns a raw output.

Parameters:
repeatTells how many samples to get from the device. Each sample takes 4 ms.
Returns:
In forced conversion output mode, will display a raw output of the average sample minus any baseline, where as the greater the value, the closer the object is to the device.

Definition at line 120 of file SI1143.cpp.

int get_ps2 ( int  repeat )

Takes a number of samples from the proximity of led2 and returns a raw output.

Parameters:
repeatTells how many samples to get from the device. Each sample takes 4 ms.
Returns:
In forced conversion output mode, will display a raw output of the average sample minus any baseline, where as the greater the value, the closer the object is to the device.

Definition at line 142 of file SI1143.cpp.

int get_ps3 ( int  repeat )

Takes a number of samples from the proximity of led3 and returns a raw output.

Parameters:
repeatTells how many samples to get from the device. Each sample takes 4 ms.
Returns:
In forced conversion output mode, will display a raw output of the average sample minus any baseline, where as the greater the value, the closer the object is to the device.

Definition at line 164 of file SI1143.cpp.

int get_vis ( int  repeat )

Takes a number of samples for ambient light on device and returns a raw output.

Parameters:
repeatTells how many samples to get from the device. Each sample takes 4 ms.
Returns:
In forced conversion output mode, will display a raw output of the average sample.

Definition at line 186 of file SI1143.cpp.

void restart ( void   )

Restarts the device.

Definition at line 45 of file SI1143.cpp.