Skip to content

Instantly share code, notes, and snippets.

#include "CayenneWiFi.h"
#include "CayenneWiFiClient.h"
#include "WiFiServer.h"
#include "WiFiUdp.h"
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <PLDuino.h>
#include <ConnectThings_ESP8266.h>
#include <Button.h>
#include <Drawable.h>
#include <GridLayout.h>
#include <Label.h>
#include <Layout.h>
#include <LinearLayout.h>
// #include <WiFi.h>
// #include <Adafruit_ESP8266.h>
#include "CayenneWiFi.h"
#include "CayenneWiFiClient.h"
// #include "WiFiServer.h"
// #include "WiFiUdp.h"
#include <ESP8266_Lib.h>
// #include <WiFi.h>
// #include <Adafruit_ESP8266.h>
@wmontg5988
wmontg5988 / esp8266example.ino
Created February 16, 2017 20:41
connect esp wpa2
#include "WiFiEsp.h"
// Emulate Serial1 on pins 6/7 if not present
#ifndef HAVE_HWSERIAL2
#include "SoftwareSerial.h"
SoftwareSerial Serial2(6, 7); // RX, TX
#endif
char ssid[] = "free"; // your network SSID (name)
char pass[] = ""; // your network password
@wmontg5988
wmontg5988 / PLCduino.ino
Last active June 30, 2017 23:00
PLCduino
/*
Cayenne ESP8266 Shield WiFi Example
Adapted from Blynk's ESP8266_Shield_HardSer Example
This sketch connects to the Cayenne server using an ESP8266 WiFi module as a shield connected
via a hardware serial to an Arduino.
You should install the ESP8266HardwareSerial.zip library via the Arduino IDE (Sketch->Include Library->Add .ZIP Library)
from the Cayenne extras/libraries folder (e.g. My Documents\Arduino\libraries\Cayenne\extras\libraries) to compile this example.
@wmontg5988
wmontg5988 / PLduino3
Last active July 12, 2017 23:24
Sketch for Digital Logger WiFi plc Arduino Mega base. Credit @kreggly at cayenne.mydevices.com for starting me out and showing me the way
/*
Cayenne ESP8266 Shield WiFi Example
Adapted from Blynk's ESP8266_Shield_HardSer Example
This sketch connects to the Cayenne server using an ESP8266 WiFi module as a shield connected
via a hardware serial to an Arduino.
You should install the ESP8266HardwareSerial.zip library via the Arduino IDE (Sketch->Include Library->Add .ZIP Library)
from the Cayenne extras/libraries folder (e.g. My Documents\Arduino\libraries\Cayenne\extras\libraries) to compile this example.
@wmontg5988
wmontg5988 / wemoslight.git
Created January 21, 2018 20:43
wemos code to control lights with slider
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <CayenneMQTTESP8266.h>
// WiFi network info.
char ssid[] = “********”;
char wifiPassword[] = “*******”;
// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = “";
char password[] = "”;
@wmontg5988
wmontg5988 / PLduino_A3_smooth
Created January 21, 2018 22:16
Change to get smooth reading from high voltage sensor
//#define CAYENNE_DEBUG // Uncomment to show debug messages
//#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <CayenneESP8266Shield.h>
#include <TMRpcm_PLDuino.h>
#include <SPI.h>
#include <SD.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <PLDuino.h>
#include <PLDTouch.h>
@wmontg5988
wmontg5988 / Remote Reboot Rpi @Adam Cayenne
Last active January 22, 2018 18:51
This python script was found on Stackoverflow.com forums. It is designed to reboot an Rpi remotely using another device by pulling up on a GPIO by use of a relay across GPIO input and 3.3v
import os
import time
import sys
# Import the modules to send commands to the system and access GPIO pins
from subprocess import call
import RPi.GPIO as gpio
from time import sleep
from os import system
gpio.setmode(gpio.BCM) # Set pin numbering to BCM numbering