Skip to content

Commit

Permalink
- Removed code for buttons
Browse files Browse the repository at this point in the history
- Added unique ID in SSID
  • Loading branch information
rzeldent committed Oct 7, 2023
1 parent 0aa633c commit e058b69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 3 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ build_flags =

lib_deps =
# Using a library name
bodmer/TFT_eSPI @ ^2.4.75
bblanchon/ArduinoJson @ ^6.19.4
lennarthennigs/Button2 @ ^2.0.3
bodmer/TFT_eSPI @ ^2.5.31
bblanchon/ArduinoJson @ ^6.21.3
prampec/IotWebConf @ ^3.2.1
rzeldent/micro-http-status @ ^1.0.1
rzeldent/micro-http-status @ ^1.0.2
rzeldent/micro-miniz @ ^1.0.0
rzeldent/micro-moustache @ ^1.0.0
rzeldent/micro-timezonedb @ ^1.0.2
8 changes: 2 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// Setting for the display are defined in platformio.ini
#include <TFT_eSPI.h>

#include <Button2.h>

#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
Expand Down Expand Up @@ -43,13 +41,11 @@ constexpr auto font_48pt = 6; // Font 6. Large 48 pixel font, needs ~2666 bytes
auto tft = TFT_eSPI(TFT_WIDTH, TFT_HEIGHT);
auto clock_sprite = TFT_eSprite(&tft);

Button2 button1(GPIO_BUTTON_TOP);
Button2 button2(GPIO_BUTTON_BOTTOM);

// Web server
DNSServer dnsServer;
WebServer server(80);
IotWebConf iotWebConf(WIFI_SSID, &dnsServer, &server, WIFI_PASSWORD, CONFIG_VERSION);
auto deviceName = String(WIFI_SSID) + "-" + String(ESP.getEfuseMac(), 16);
IotWebConf iotWebConf(deviceName.c_str(), &dnsServer, &server, WIFI_PASSWORD, CONFIG_VERSION);

auto param_group = iotwebconf::ParameterGroup("openweather", "Open Weather");
auto iotWebParamOpenWeatherApiKey = iotwebconf::Builder<iotwebconf::TextTParameter<33>>("apikey").label("Open Weather API key").defaultValue(DEFAULT_OPENWEATHER_API_KEY).build();
Expand Down

0 comments on commit e058b69

Please sign in to comment.