2017-05-18 23:31:51 +00:00
|
|
|
/*
|
|
|
|
* Author: Ayush Sharma (ayushsharma82) Github
|
|
|
|
* Library: EasyUI
|
|
|
|
* - This is a Test Code of EasyUI Library
|
|
|
|
* - It Will Use the OnBoard LED of ESP8266 and toggle it.
|
|
|
|
*/
|
|
|
|
#include <ESP8266WiFi.h>
|
|
|
|
#include <WiFiClient.h>
|
|
|
|
#include <EasyUI.h>
|
|
|
|
|
2017-05-19 23:32:31 +00:00
|
|
|
const char* ssid = ".........";
|
|
|
|
const char* password = "..........";
|
2017-05-18 23:31:51 +00:00
|
|
|
|
|
|
|
void setup(void) {
|
|
|
|
Serial.begin(115200);
|
|
|
|
WiFi.begin(ssid, password);
|
|
|
|
Serial.println("");
|
|
|
|
// Wait for connection
|
|
|
|
while (WiFi.status() != WL_CONNECTED) {
|
|
|
|
delay(500);
|
|
|
|
Serial.print(".");
|
|
|
|
}
|
|
|
|
Serial.println("");
|
|
|
|
Serial.print("IP address: ");
|
|
|
|
Serial.println(WiFi.localIP());
|
|
|
|
|
2017-05-19 23:32:31 +00:00
|
|
|
// Detects Internet Connectivity and Switches to Online CDN. (For STA Mode Only)
|
|
|
|
EasyUI.detectCDN(true);
|
2017-05-18 23:31:51 +00:00
|
|
|
EasyUI.label("Label","123");
|
2017-05-19 23:32:31 +00:00
|
|
|
EasyUI.toggleButton(2, "LED", HIGH, true); // LED Toggle Button
|
2017-05-18 23:31:51 +00:00
|
|
|
EasyUI.begin();
|
|
|
|
}
|
|
|
|
|
|
|
|
void loop(void) {
|
|
|
|
EasyUI.loop();
|
|
|
|
}
|