Skip to content

Instantly share code, notes, and snippets.

@Jswoon
Jswoon / gist:e2342872be1b9bb8af0eec454d85fac6
Created April 29, 2016 05:25
Uploading data from Ultrasonic Sensor using NodeMCU to ThingSpeak
//Woon Jun Shen
#include <ESP8266WiFi.h>
#include <OneWire.h>
#include <PubSubClient.h>
const char *ssid = "shen"; //Your Access Point or Personal Hotspot, cannot be longer than 32 characters!
const char *pass = "0129090100"; //Your Access Point or Personal Hotspot password
const char* serverTS = "api.thingspeak.com";
String apiKey = "BQXNCQQJDSTXJ0JN"; //Insert your Channel API Key here