Summary
- • Fast & user friendly development
• Work with GPIO in Arduino style
• High effective in perfomance and memory usage (this is native firmware!)
• Compatible with standard Arduino libraries - use any popular hardware in few lines of code
• Build-in file system: spiffs
• Build-in powerfull network and wireless modules
• Build-in great JSON library: ArduinoJson
• Simple and powerfull hardware API wrappers
• Based on Espressif SDK v1.0
Getting started
On Windows
- • Download ESP8266 Unofficial DevKit
• Import Sming example projects to Eclipse IDE
• If you have SDK v0.9.5, please rename "C:\Espressif\ESP8266_SDK\include\lwip" to lwip_old
• Compile it and flash to chip!
You can find more information about compilation and flashing process by reading Unofficial DevKit forum discussion thread.
Support development
If you like Sming project you can make donation here:
Examples
GPIO
#define LED_PIN 2 // GPIO2
...
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH);
DHT22
#include <Libraries/DHT/DHT.h> // This is just popular Arduino library!
DHT dht(0, DHT22); // GPIO0
void init()
{
dht.begin();
float h = dht.readHumidity();
float t = dht.readTemperature();
}
HTTP Client
HttpClient thingSpeak;
...
thingSpeak.downloadString("http://api.thingspeak.com/update?key=XXXXXXX&field1=" + String(sensorValue), onDataSent);
WEB Server
server.listen(80);
server.addPath("/", onIndex);
server.setDefaultHandler(onFile);
Serial.print("Started: ");
Serial.println(WifiStation.getIP());
...
void onIndex(HttpRequest &request, HttpResponse &response)
{
TemplateFileStream *tmpl = new TemplateFileStream("index.html");
auto &vars = tmpl->variables();
vars["counter"] = String(counter);
vars["IP"] = WifiStation.getIP().toString();
vars["MAC"] = WifiStation.getMAC();
response.sendTemplate(tmpl);
}
Sources: https://github.com/anakod/Sming
License: LGPL
I'm author of this project. I will be glad to answer any questions you may have!