ESP8266 sample sketch and RemoteSign Library

A library is available for use with Arduino and ESP8266 type processors. The library and sample sketch (ino file) can be downloaded here. You can open it in the Arduino IDE

In order to be able to handle {VW} commands (virtualWrites) with Blynk, uncomment the three lines that refer to Blynk.

Note: Some commands defined in the SDK are not yet implemented but should return a {MSG} stating if that is the case.

Sample sketch with the RemoteSign stuff highlighted:

#include "ESP8266WiFi.h"
#include "RemoteSign.h"
//#include "Blynkhelper.h" // uncomment if you are using Blynk
#include <BlynkSimpleEsp8266.h>

RemoteSign rs; // define rs as a RemoteSign object

void executeEvent(int channel,String param) {
   // place your code here to handle events requested by RemoteSign
} // executeEvent

void setup() {
  WiFi.begin("your SSID", "password");

  rs.begin(); //create an instance of RemoteSign
  // set up RemoteSign
  // set the version
  rs.setFirmwareVersion("Sample code 0.9");
  // define some SAMPLE channel data
  rs.setChannelData(1, 'M', 4, true, "warm white"); // channel 1 is a monochrome light on pin 4
  rs.setChannelData(2, 'M', 5, true, "cool white");  // channel 2 is another monochrome light on pin 5
  rs.setChannelData(3, 'M', 7, false, "closet");  // channel 3 is a non-dimmable light on pin 7
  rs.setChannelData(4, 'E', "Lightning"); // channel 4 is an event called "Lightning"
} // setup 

void loop() {;

// helper functions needed to help RemoteSign call Blynk
void BlynkVWriteByte_helper(uint8_t pin, uint8_t value) {
   //Blynk.virtualWrite(pin, value);  // uncomment if using Blynk

void BlynkVWriteStr_helper(uint8_t pin, char const *pchar) {
   //Blynk.virtualWrite(pin, pchar);  // uncomment if using Blynk