Skip to content

Instantly share code, notes, and snippets.

View nanofortran's full-sized avatar
💭
I may be slow to respond.

Jason E. Geistweidt nanofortran

💭
I may be slow to respond.
View GitHub Profile
@nanofortran
nanofortran / MAC Address Finder
Created June 9, 2018 18:47
Find the MAC address and other stuff regarding your esp8266
#include "ESP8266WiFi.h"
String s;
void setup() {
Serial.begin(115200);
import processing.video.*;
Capture video;
import mqtt.*;
MQTTClient client;
@nanofortran
nanofortran / nodeRedCommand.txt
Last active July 25, 2017 18:35
A node red flow to work with your subscribeDashboard.ino on the esp8266
[
{
"id": "f67a8815.55c29",
"type": "mqtt in",
"z": "4fd55236.836b34",
"name": "",
"topic": "theTopic/+",
"qos": "2",
"broker": "943e030b.e248d",
"x": 100,
@nanofortran
nanofortran / subscribeDashboard.ino
Last active July 25, 2017 19:18
A dashboard command center to effect changes at a distance
//////////
//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.
//////////
//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.
//
@nanofortran
nanofortran / MQTT_PublishSubcribe_Demo.ino
Created July 23, 2017 18:37
MQTT_PublishSubcribe_Demo.ino is a heavily commented pubish/subscribe demo for the esp8266 device.
//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.
//
@nanofortran
nanofortran / LCD_Base_Station_Subscribe.ino
Last active July 8, 2017 19:40
Subscribe to the MQTT server and display data on the LCD
#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
@nanofortran
nanofortran / HECE_IoT_SpaceBrew.ino
Created June 29, 2017 21:55
This one works, however
#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";
//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 ""
@nanofortran
nanofortran / HCDE_IoT_SpaceBrew_ICE#2.ino
Last active June 29, 2017 16:42
HCDE_IoT_SpaceBrew_ICE#2.ino
//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"