The base class for all sensors of any type. More...
#include <sensor.hpp>
Public Member Functions | |
virtual | ~Sensor () |
virtual T | value () const =0 |
The base class for all sensors of any type.
T | The return type of this sensor. For example, a sensor returning true or false should be of type bool. |
|
pure virtual |
Get the current value for this sensor
Implemented in IdButton, BackEMF, Analog8, SensorLogic::Not, SensorLogic::Xor, SensorLogic::Or, SensorLogic::And, Digital, Analog, AccelZ, AccelY, and AccelX.
Referenced by AbstractButton::isPressed().