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