|
M5Unit-INFRARED 0.2.0 git rev:76ad9e1
|
ITR9606 infrared photointerrupter unit. More...
#include <unit_ITR9606.hpp>
Classes | |
| struct | config_t |
| Settings for begin. More... | |
Public Member Functions | |
| config_t | config () const |
| Gets the config values. | |
| void | config (const config_t &cfg) |
| Set the config values. | |
| bool | begin () override |
| void | update (const bool force=false) override |
Detection state | |
| bool | isDetected () const |
| Current detection state. | |
| bool | wasDetected () const |
| Rising edge detection (object entered the slot) | |
| bool | wasReleased () const |
| Falling edge detection (object left the slot) | |
Direct reading | |
| bool | readDetection (bool &detected) |
| Read the sensor pin state directly. | |
ITR9606 infrared photointerrupter unit.
The ITR9606 is a transmissive photointerrupter consisting of an IR LED and a phototransistor. When an object passes through the slot and blocks the IR beam, the output changes state. Output is active LOW: LOW when blocked (object detected), HIGH when clear.
|
inline |
Current detection state.
| bool m5::unit::UnitITR9606::readDetection | ( | bool & | detected | ) |
Read the sensor pin state directly.
| [out] | detected | true if an object is blocking the IR beam |
|
inline |
Rising edge detection (object entered the slot)
|
inline |
Falling edge detection (object left the slot)