1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-16 14:00:58 +00:00
ESPUI/examples/UI_Test/UI_Test.ino
ayushsharma82 45f47a72c5 Updated to V0.6
- Added Internet Detection to Switch to CDN
- Optimized PROGMEM Data
- Improved UI for Mobile Displays
- Added SoftAP Example
- Fixed Example code for Generic ESP8266 Boards
2017-05-20 05:02:31 +05:30

37 lines
876 B
C++

/*
* 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>
const char* ssid = ".........";
const char* password = "..........";
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());
// Detects Internet Connectivity and Switches to Online CDN. (For STA Mode Only)
EasyUI.detectCDN(true);
EasyUI.label("Label","123");
EasyUI.toggleButton(2, "LED", HIGH, true); // LED Toggle Button
EasyUI.begin();
}
void loop(void) {
EasyUI.loop();
}