upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _emg_context |
Functions | |
emg_context | emg_init (int16_t pin) |
void | emg_close (emg_context dev) |
upm_result_t | emg_set_aref (const emg_context dev, float aref) |
upm_result_t | emg_set_scale (const emg_context dev, float scale) |
upm_result_t | emg_set_offset (const emg_context dev, float offset) |
float | emg_get_aref (const emg_context dev) |
float | emg_get_scale (const emg_context dev) |
float | emg_get_offset (const emg_context dev) |
upm_result_t | emg_get_normalized (const emg_context dev, float *value) |
upm_result_t | emg_get_raw_volts (const emg_context dev, float *value) |
upm_result_t | emg_get_volts (const emg_context dev, float *value) |
Typedefs | |
typedef struct _emg_context * | emg_context |
emg_context emg_init | ( | int16_t | pin | ) |
Initialize analog sensor
pin | Analog pin |
void emg_close | ( | emg_context | dev | ) |
Analog sensor destructor
sensor | context pointer |
upm_result_t emg_set_aref | ( | const emg_context | dev, |
float | aref | ||
) |
Set ADC reference voltage
dev | sensor context pointer |
aref | ADC reference voltage |
upm_result_t emg_set_scale | ( | const emg_context | dev, |
float | scale | ||
) |
Set sensor scale. This scale is applied to the return value: counts = counts * scale
dev | sensor context pointer |
scale | count scale value used |
upm_result_t emg_set_offset | ( | const emg_context | dev, |
float | offset | ||
) |
Set sensor offset. This offset is applied to the return value: value = value + offset
dev | sensor context pointer |
offset | count offset value used |
float emg_get_aref | ( | const emg_context | dev | ) |
Get sensor aref
dev | sensor context pointer |
float emg_get_scale | ( | const emg_context | dev | ) |
Get sensor scale
dev | sensor context pointer |
float emg_get_offset | ( | const emg_context | dev | ) |
Get sensor offset
dev | sensor context pointer |
upm_result_t emg_get_normalized | ( | const emg_context | dev, |
float * | value | ||
) |
Read normalized value for sensor
dev | sensor context pointer |
*value | Normalized value (0.0 -> 1.0) |
upm_result_t emg_get_raw_volts | ( | const emg_context | dev, |
float * | value | ||
) |
Read raw voltage from the sensor
dev | sensor context pointer |
*value | Raw sensor voltage |
upm_result_t emg_get_volts | ( | const emg_context | dev, |
float * | value | ||
) |
Read scaled/offset voltage from the sensor
dev | sensor context pointer |
*value | Adjusted sensor voltage |
typedef struct _emg_context * emg_context |
driver context