OpenDevice
Open IoT (Internet Of Things) Platform and Framework http://opendevice.io
|
Public Member Functions | |
AdafruitSensor (Adafruit_Sensor *_impl, DeviceType type) | |
void | init () |
bool | hasChanged () |
![]() | |
Device (uint8_t ipin) | |
Device (uint8_t ipin, DeviceType type) | |
Device (uint8_t ipin, DeviceType type, bool sensor) | |
Device (uint8_t iid, uint8_t ipin, DeviceType type) | |
Device (uint8_t iid, uint8_t ipin, DeviceType type, bool sensor) | |
bool | setValue (value_t value, bool sync=true) |
void | on () |
void | off () |
bool | isON () |
bool | isOFF () |
value_t | getValue () |
virtual size_t | serializeExtraData (DeviceConnection *conn) |
virtual void | deserializeExtraData (Command *cmd, DeviceConnection *conn) |
bool | canReadSensor () |
void | name (const char *name) |
const char * | name () |
Device * | enableInterrupt (uint8_t mode=CHANGE) |
Device * | invertedState () |
Device * | activeLow () |
Device * | setInterval (int32_t _interval) |
void | onChange (DeviceListener) |
void | setSyncListener (DeviceListener listener) |
bool | notifyListeners () |
int | toString (char buffer[]) |
Additional Inherited Members | |
![]() | |
enum | DeviceType { DIGITAL = 1, ANALOG = 2, ANALOG_SIGNED = 3, NUMERIC = 4, FLOAT2 = 5, FLOAT2_SIGNED = 6, FLOAT4 = 7, CHARACTER = 8, BOARD = 10, MANAGER = 11 } |
![]() | |
uint8_t | id |
uint8_t | pin |
value_t | currentValue |
DeviceType | type |
const char * | deviceName |
bool | sensor |
int32_t | readLastTime |
int32_t | readInterval |
uint8_t | targetID |
bool | inverted |
volatile bool | needSync |
bool | interruptEnabled |
uint8_t | interruptMode |
![]() | |
static const uint8_t | MAX_ANALOG_VALUE = 255 |
Adapter for Adafruit Unified Sensor Library: https://github.com/adafruit/Adafruit_Sensor
|
virtual |
For Sensors :: read sensor ans check if value has changed
Reimplemented from Device.
|
virtual |
This will be called on ODev.begin() to do extra initialization
Reimplemented from Device.