#ifndef RF433_H #define RF433_H #include #include"writepin.h" #define LARGE_TIME 750 #define SMALL_TIME 250 class WirelessRelay { public: static const MAX_NAME_LENGTH = 32; char name[MAX_NAME_LENGTH]; private: bool _state = false; uint16_t _nameAddr; uint16_t _id; void sendBit( const bool i); void sync(); void sendId(); public: WirelessRelay(const uint16_t id, uint16_t nameAddr, char* nameIn = ""); WirelessRelay(); void setTimeout(uint64_t timeout); void init(const uint16_t id, uint16_t nameAddr, char* nameIn = ""); void on(); void off(); uint16_t getId(); bool getExpectedState(); }; #endif