mirror of
https://github.com/s00500/ESPUI.git
synced 2025-06-11 18:00:38 +00:00
sync up examples
This commit is contained in:
@ -11,12 +11,9 @@ DNSServer dnsServer;
|
||||
#include <ESP8266WiFi.h>
|
||||
#endif
|
||||
|
||||
// true for verbose, false for quiet
|
||||
ESPUIClass ESPUI( Verbosity::VerboseJSON );
|
||||
|
||||
const char* ssid = "ESPUI";
|
||||
const char* password = "espui";
|
||||
const char* hostname = "EspuiTest";
|
||||
const char* hostname = "espui";
|
||||
|
||||
uint16_t button1;
|
||||
|
||||
@ -166,9 +163,9 @@ void setup( void ) {
|
||||
Serial.print( "\n\nTry to connect to existing network" );
|
||||
|
||||
{
|
||||
uint8_t timeout = 5;
|
||||
uint8_t timeout = 10;
|
||||
|
||||
// Wait for connection, 2.5s timeout
|
||||
// Wait for connection, 5s timeout
|
||||
do {
|
||||
delay( 500 );
|
||||
Serial.print( "." );
|
||||
@ -233,14 +230,19 @@ void setup( void ) {
|
||||
* (.prepareFileSystem has to be run in an empty sketch before)
|
||||
*/
|
||||
|
||||
// Enable this option if you want sliders to be continuous (update during move) and not discrete (update on stop)
|
||||
// ESPUI.sliderContinuous = true;
|
||||
|
||||
/*
|
||||
* Optionally you can use HTTP BasicAuth. Keep in mind that this is NOT a
|
||||
* SECURE way of limiting access.
|
||||
* Anyone who is able to sniff traffic will be able to intercept your password
|
||||
* since it is transmitted in cleartext. Just add a username and password,
|
||||
* for example begin("ESPUI Control", "username", "password")
|
||||
* since it is transmitted in cleartext. Just add a string as username and
|
||||
* password, for example begin("ESPUI Control", "username", "password")
|
||||
*/
|
||||
ESPUI.begin( "ESPUI Control" );
|
||||
|
||||
|
||||
ESPUI.begin("ESPUI Control");
|
||||
}
|
||||
|
||||
void loop( void ) {
|
||||
@ -253,6 +255,7 @@ void loop( void ) {
|
||||
ESPUI.updateControl( "Millis:", String( millis() ) );
|
||||
switchi = !switchi;
|
||||
ESPUI.updateControl( "Switch one", switchi ? "1" : "0" );
|
||||
|
||||
oldTime = millis();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user