This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266mDNS.h> | |
#include <WiFiUdp.h> | |
#include <PubSubClient.h> | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 4 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(4, PIN, NEO_GRB + NEO_KHZ800); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****** Current Format ******/ | |
// Basic Message | |
metadata = { | |
id: 1234234234, // Randomly generated by the client. Used for receiving success/fail callbacks | |
client_id: 123456 // Sent from the server with the `websocket_rails.client_connected` event which is sent after the connection is opened. Store this and send it with each message. | |
data: {name: 'shoes'} // Arbitrary data. Can be Object or String. This is available through #message or #data in the controller. | |
} | |
event = ["products.new", metadata] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |