Go to the source code of this file.
|
|
#define | ROTARY_MAX_ANGLE 300 |
| |
Rotary angle sensor initialization function
- Parameters
-
| pin | analog pin to use |
| aRef | reference voltage |
- Returns
- sensor context
Rotary destructor
- Parameters
-
| dev | sensor context pointer |
| upm_result_t rotary_get_value_voltage |
( |
const rotary_context |
dev, |
|
|
float * |
volts |
|
) |
| |
Gets the voltage value from the analog pin
- Parameters
-
| dev | sensor context pointer |
| volts | sensor voltage value |
- Returns
- result of the operation
| upm_result_t rotary_get_value_angle |
( |
rotary_context |
dev, |
|
|
float * |
rotval |
|
) |
| |
Gets the position of the rotary angle sensor in degrees
- Parameters
-
| dev | sensor context pointer |
| rotval | sensor position in degrees |
- Returns
- result of the operation