Skip to content

Instantly share code, notes, and snippets.

@prasertsakd
prasertsakd / udp_smart_plug.ino
Created April 21, 2015 05:06
Simple UDP Server for Smart Plug
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
WiFiUDP Udp;
const char* ssid = "----------";
const char* password = "--------------";
IPAddress local_ip = {192,168,1,200};
IPAddress gateway = {192,168,1,1};
@prasertsakd
prasertsakd / udp_server.ino
Last active August 29, 2015 14:19
esp8266 + arduino code fix ip
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
WiFiUDP Udp;
const char* ssid = "------------";
const char* password = "---------------";
IPAddress local_ip = {192,168,1,200};
IPAddress gateway = {192,168,1,1};
@prasertsakd
prasertsakd / thinkspeak_rest.ino
Created April 14, 2015 06:53
Thinkspeak Post Data
#include <ESP8266WiFi.h>
const char* ssid = "-----------";
const char* password = "-----------";
// ThingSpeak Settings
char thingSpeakAddress[] = "api.thingspeak.com";
String writeAPIKey = "----------------------";
const int updateThingSpeakInterval = 15 * 1000; // Time interval in milliseconds to update ThingSpeak (number of seconds * 1000 = interval)
@prasertsakd
prasertsakd / webserver.ino
Last active January 9, 2023 23:36
Webserver for Arduino ESP8266
//Leonardo
Serial_ & dbgTerminal = Serial;
HardwareSerial & espSerial = Serial1;
////UNO & M328P
//#include <SoftwareSerial.h>
//SoftwareSerial dbgTerminal(10, 11); // RX, TX
//HardwareSerial & espSerial = Serial;
//