diff --git a/.gitignore b/.gitignore index 0346078..f7bd02f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Arduino build artifacts build/ +.pio/ *.bin *.elf *.map diff --git a/README.md b/README.md index 32b9068..75ca24e 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ See [CHANGELOG.md](CHANGELOG.md) for the full version history with technical det - `Adafruit SSD1306` - `NTPClient` - `WiFiManager` (by tzapu) - - `AsyncHTTPRequest_Generic` + - `asyncHTTPrequest` (by Bob Lemaire) - `ESPAsyncTCP` - `ArduinoJson` (by Benoit Blanchon) @@ -605,7 +605,7 @@ Device reboots immediately. - [ESP8266 Arduino Core](https://github.com/esp8266/Arduino) - [Adafruit SSD1306](https://github.com/adafruit/Adafruit_SSD1306) - [WiFiManager](https://github.com/tzapu/WiFiManager) -- [AsyncHTTPRequest_Generic](https://github.com/khoih-prog/AsyncHTTPRequest_Generic) +- [asyncHTTPrequest](https://github.com/boblemaire/asyncHTTPrequest) - [NTPClient](https://github.com/arduino-libraries/NTPClient) **APIs**: diff --git a/firmware/weather_clock/weather.cpp b/firmware/weather_clock/weather.cpp index 08f91dd..5044146 100644 --- a/firmware/weather_clock/weather.cpp +++ b/firmware/weather_clock/weather.cpp @@ -3,20 +3,18 @@ * TJ-56-654 Weather Clock v1.9.3 */ -// Include AsyncHTTPRequest BEFORE globals.h to provide full type definition +// Include asyncHTTPrequest before globals.h to provide the full type definition #include -#define ASYNCHTTPREQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.13.0" -#define ASYNCHTTPREQUEST_GENERIC_VERSION_MIN 1013000 -#include +#include #include "globals.h" #include // Async HTTP client for weather (local to this file) -static AsyncHTTPRequest weatherRequest; +static asyncHTTPrequest weatherRequest; // Weather response callback -void ICACHE_FLASH_ATTR onWeatherResponse(void* optParm, AsyncHTTPRequest* request, int readyState) { +void ICACHE_FLASH_ATTR onWeatherResponse(void* optParm, asyncHTTPrequest* request, int readyState) { (void)optParm; // Unused if (readyState == 4) { // Request complete diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..4050c23 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,19 @@ +[platformio] +src_dir = firmware/weather_clock + +[env:esp01_1m] +platform = espressif8266 +board = esp01_1m +framework = arduino +board_build.ldscript = eagle.flash.1m64.ld +board_build.flash_mode = dio +upload_speed = 115200 +upload_resetmethod = nodemcu +lib_deps = + adafruit/Adafruit GFX Library + adafruit/Adafruit SSD1306 + arduino-libraries/NTPClient + tzapu/WiFiManager + boblemaire/asyncHTTPrequest @ 1.2.2 + me-no-dev/ESPAsyncTCP + bblanchon/ArduinoJson @ ^7