This file contains hidden or 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" | |
| String s; | |
| void setup() { | |
| Serial.begin(115200); | |
This file contains hidden or 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
| import processing.video.*; | |
| Capture video; | |
| import mqtt.*; | |
| MQTTClient client; | |
This file contains hidden or 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
| [ | |
| { | |
| "id": "f67a8815.55c29", | |
| "type": "mqtt in", | |
| "z": "4fd55236.836b34", | |
| "name": "", | |
| "topic": "theTopic/+", | |
| "qos": "2", | |
| "broker": "943e030b.e248d", | |
| "x": 100, |
This file contains hidden or 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
| ////////// | |
| //Super commenting is ON . . . | |
| //This program allows us to 'talk' to an esp8266 via the NODE-Red dashboard. | |
| //The NR flow subscribes to the MQTT server and then publishes messages via | |
| //the Color Picker, Switch, Form, and Slide modules, providing a way to change | |
| //the state of an RGB led, an LCD, and servo on the remote device. This program | |
| //only subscribes to the MQTT server, reading messages originating at the server | |
| //via the dashboard (web) interface, but there is no reason that one could | |
| //not publish from the remove device as well. | |
| ////////// |
This file contains hidden or 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
| //HEAVY commenting is on . . . | |
| //In this program we are publishing and subscribing to a MQTT server that requires a login/password | |
| //authentication scheme. We are connecting with a unique client ID, which is required by the server. | |
| //This unique client ID is derived from our device's MAC address, which is unique to the device, and | |
| //thus unique to the universe. | |
| // | |
| //We are publishing with a generic topic ("theTopic") which you should change to ensure you are publishing | |
| //to a known topic (eg, if everyone uses "theTopic" then everyone would be publishing over everyone else, which | |
| //would be a mess). So, create your own topic channel. | |
| // |
This file contains hidden or 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
| //HEAVY commenting is on . . . | |
| //In this program we are publishing and subscribing to a MQTT server that requires a login/password | |
| //authentication scheme. We are connecting with a unique client ID, which is required by the server. | |
| //This unique client ID is derived from our device's MAC address, which is unique to the device, and | |
| //thus unique to the universe. | |
| // | |
| //We are publishing with a generic topic ("theTopic") which you should change to ensure you are publishing | |
| //to a known topic (eg, if everyone uses "theTopic" then everyone would be publishing over everyone else, which | |
| //would be a mess). So, create your own topic channel. | |
| // |
This file contains hidden or 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 "Wire.h" | |
| #include <LiquidTWI.h> | |
| #include <ESP8266WiFi.h> | |
| #include <PubSubClient.h> | |
| #include <ArduinoJson.h> | |
| #define wifi_ssid "" | |
| #define wifi_password "" | |
| #define mqtt_server "mediatedspaces.net" | |
| #define mqtt_user "hcdeiot" //your user name should be unique |
This file contains hidden or 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 <ESP8266WiFiMulti.h> | |
| #include <WebSocketsClient.h> | |
| #include <Spacebrew.h> | |
| const char* ssid = "University of Washington"; | |
| const char* password = ""; | |
| char host[] = "mediatedspaces.net"; | |
| char clientName[] = "Jason's ESP8266"; |
This file contains hidden or 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
| //Libraries to include | |
| #include <ESP8266WiFi.h> | |
| #include <PubSubClient.h> | |
| #include <Wire.h> | |
| #include <Adafruit_Sensor.h> | |
| #include <Adafruit_TSL2561_U.h> | |
| #include <Adafruit_Si7021.h> | |
| //Some immutable definitions/constants | |
| #define ssid "" |
This file contains hidden or 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
| //LIBRARIES | |
| #include <ESP8266WiFi.h> | |
| #include <ESP8266WiFiMulti.h> | |
| #include <WebSocketsClient.h> | |
| #include <Spacebrew.h> | |
| //DEFINES | |
| #define ssid "University of Washington" | |
| #define pass "" | |
| #define sbHost "mediatedspaces.net" |
NewerOlder