/* Arduino light control of Nexa and Everflourish RF 433.92 MHz based systems. For details, see: http://hblok.net http://hblok.net/blog/posts/tag/433 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __RF443_H__ #define __RF443_H__ enum Type {NEXA, EVERFLOURISH}; enum State {OFF, ON}; // Timings in micro seconds // Nexa const int NEXA_SHORT_LOW_0 = 270; const int NEXA_LONG_LOW_1 = 1220; const int NEXA_HIGH_SPACE = 270; const int NEXA_START_LOW = 2670; // Everflourish const int EF_SHORT_LOW_0 = 567; const int EF_LONG_LOW_1 = 1134; const int EF_HIGH_SPACE = 680; const int EF_END_LOW = 15000; typedef struct Light { enum Type type; int off[4]; int on[4]; } Light; void set_out_pin(int pin); void send(Light light, State state); void send_everflourish(const int *light_data); void send_nexa(const int *light_data); void send_bytes(const int *bytes, int len_bytes); void write_data(int data_bit); void write_wire(int wire_bit); #endif