Nexa/HomeEasy control library with absolute dim support.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE.md Initial commit Jan 31, 2013
NexaCtrl.cpp Bitshift power2 function Nov 7, 2016
NexaCtrl.h
README.mkd Update README.mkd Dec 20, 2013

README.mkd

NexaCtrl

Arudino NexaCtrl Library v.02 - Nexa/HomeEasy control library for arduino with absolute dim support.
Original author of this library is James Taylor (http://jtlog.wordpress.com/)

Version 02 by Carl Gunnarsson - Refactoring and adding support for absolute dimming.

Example

#include <NexaCtrl.h>

#define TX_PIN 13
#define RX_PIN 8

// Your remote id which can be it can be "sniffed" with the 
// reciever example at http://playground.arduino.cc/Code/HomeEasy
const static unsigned long controller_id = 1234567;
unsigned int device = 0;

NexaCtrl nexaCtrl(TX_PIN, RX_PIN);

void setup()
{
    nexaCtrl.DeviceDim(controller_id, device, 0);
    delay(3000);
    nexaCtrl.DeviceDim(controller_id, device, 15);
    delay(3000);
    nexaCtrl.DeviceDim(controller_id, device, 0);

    delay(3000);

    nexaCtrl.DeviceOn(controller_id, device);
    delay(3000);
    nexaCtrl.DeviceOff(controller_id, device);

    delay(3000);

    nexaCtrl.GroupOff(controller_id);
    delay(3000);
    nexaCtrl.GroupOn(controller_id);
}

void loop()
{
}