NexaCtrl Library v3. An Arduino/ESP8266 Nexa/HomeEasy control library with absolute dim support The original author of this library is James Taylor (http://jtlog.wordpress.com/)
- v2 Carl Gunnarsson. Refactoring and introduction of support for absolute dimming
- v3 Joe Lippa. Extensive refactoring and introduction of support for ESP8266 devices
v3 was tested with an ESP12-F connected to an MX-FS-03V 433MHz transmitter operating at 3.3v, sending on and off signals to Home Easy HE107G and HE108G switches
#include "Arduino.h"
#include "NexaCtrl.h"
#define TX_PIN 13
// Your remote controller id which can be "sniffed" with the
// receiver example at http://playground.arduino.cc/Code/HomeEasy
const static unsigned long controller_id = 1234567;
unsigned int device_id = 0;
NexaCtrl nexaCtrl(TX_PIN, controller_id);
void setup()
{
nexaCtrl.DeviceDim(device_id, 0);
delay(3000);
nexaCtrl.DeviceDim(device_id, 15);
delay(3000);
nexaCtrl.DeviceDim(device_id, 0);
delay(3000);
nexaCtrl.DeviceOn(device_id);
delay(3000);
nexaCtrl.DeviceOff(device_id);
delay(3000);
nexaCtrl.GroupOff();
delay(3000);
nexaCtrl.GroupOn();
}
void loop()
{
}