upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the RPR220-based Grove IR Reflective Sensor. More...
UPM module for the Grove IR reflective sensor. The sensitivity can be adjusted with the potentiometer on the sensor module. It has a range of approximately 15 mm, and a quick response time.
It detects high-contrast dark areas on a light background.
This module allows the user to determine the current status (black detected or not). Additionally, if desired, an interrupt service routine (ISR) can be installed that is called when black is detected. Either method can be used, depending on your use case.
Public Member Functions | |
synchronized void | delete () |
RPR220 (int pin) | |
boolean | blackDetected () |
void | installISR (IsrCallback cb) |
void | uninstallISR () |
boolean blackDetected | ( | ) |
Gets the status of the pin; true means black has been detected
void uninstallISR | ( | ) |
Uninstalls the previously installed ISR