Skip to content

Instantly share code, notes, and snippets.

@igrr
igrr / OTATest.ino
Created June 11, 2015 15:24
ESP8266 Arduino OTA example v1
#include <ESP8266WiFi.h>
#include <WiFiUDP.h>
const char* ssid = "..........";
const char* password = "...........";
WiFiUDP listener;
void setup() {
Serial.begin(115200);
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
const char* ssid = "..............";
const char* password = "................";
String form = "<form action='led'><input type='radio' name='state' value='1' checked>On<input type='radio' name='state' value='0'>Off<input type='submit' value='Submit'></form>";
String imagepage = "<img src='/led.png'>";
@igrr
igrr / esp8266_pubsubclient.ino
Created January 6, 2015 23:44
PubSubClient sample for ESP8266 Arduino
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
const char* ssid = ".................";
const char* password = "................";
char* topic = "esp8266_arduino_out";
char* server = "iot.eclipse.org";
@igrr
igrr / mem_usage.sh
Last active June 3, 2016 16:39
Get memory usage from elf file (esp8266 toolchain, using linker script from SDK)
#!/bin/bash
# Print data, rodata, bss sizes in bytes
#
# Usage:
# OBJDUMP=../xtensa-lx106-elf/bin/xtensa-lx106-elf-objdump ./mem_usage.sh app.out [total_mem_size]
#
# If you specify total_mem_size, free heap size will also be printed
# For esp8266, total_mem_size is 81920
#