1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-06-12 04:10:39 +00:00

update readme and example

This commit is contained in:
2017-11-29 11:35:54 +01:00
parent 09e3a9c71b
commit 24dafcc8bb
2 changed files with 12 additions and 5 deletions

View File

@ -40,6 +40,8 @@ void setup(void) {
ESPUI.pad("Pad without center", false, &padExample, COLOR_CARROT);
ESPUI.switcher("Switch one", false, &switchExample, COLOR_ALIZARIN);
ESPUI.switcher("Switch two", true, &otherSwitchExample, COLOR_NONE);
ESPUI.slider("Slider one", &slider, COLOR_ALIZARIN, "30");
ESPUI.slider("Slider two", &slider, COLOR_NONE, "100");
ESPUI.begin("ESP32 Control");
}
@ -53,6 +55,10 @@ void loop(void) {
}
}
void slider(Control sender, int type) {
Serial.println(sender.value);
}
void buttonCallback(Control sender, int type) {
switch (type) {
case B_DOWN: