|
upm
0.3.1
Sensor/Actuator repository for libmraa (v0.7.2)
|
API for the A110X Hall Effect sensors. More...
UPM module for the A110X (A1101, A1102, A1103, A1104, and A1106) Hall Effect sensors. It outputs a digital signal indicating whether it is detecting a magnetic field with south polarity perpendicular to the sensor element.
An example showing a simple test for the presence of a field
An example demonstrating the use of an interrupt handler to count pulses
Public Member Functions | |
| A110X (int pin) | |
| ~A110X () | |
| bool | magnetDetected () |
| void | installISR (void(*isr)(void *), void *arg) |
| void | uninstallISR () |
| A110X | ( | int | pin | ) |
A110x digital sensor constructor
| pin | digital pin to use |
| bool magnetDetected | ( | ) |
Determine whether a magnetic field of south polarity has been detected
| void installISR | ( | void(*)(void *) | isr, |
| void * | arg | ||
| ) |
Install an Interrupt Service Routine (ISR) to be called when the appropriate magnetic field is detected.
| fptr | function pointer to function to be called on interrupt |
| arg | pointer to an object that will be supplied as an arguement to the ISR. |
| void uninstallISR | ( | ) |
Uninstall the previously installed Interrupt Service Routine (ISR)
1.8.9.1