ThingPulse / esp8266-weather-station

ESP8266 Weather Station library supporting OpenWeatherMap, Aeris and other sources
MIT License
1.06k stars 359 forks source link

ESP32 again #186

Closed millenseer closed 2 years ago

millenseer commented 3 years ago

Expected behavior

should compile

Actual behavior

Compiling "WeatherStationDemo.ino"

C:\Arduino\libraries\ESP8266_Weather_Station\src\AerisForecasts.cpp: In member function 'void AerisForecasts::doUpdate(AerisForecastData*, String, uint8_t)':
C:\Arduino\libraries\ESP8266_Weather_Station\src\AerisForecasts.cpp:48:31: error: no matching function for call to 'WiFiClient::connect(const String&, const uint8_t&)'
   if(client.connect(host, port)) {
                               ^

What am I missing?

I added this code to AerisObservations.cpp and AerisForecasts.cpp

typedef signed short        sint16_t;
typedef signed long         sint32_t;

Those Aeris-Files are not required for the standard Demo "WeatherStationDemo.ino". The "WiFiClient::connect"-error remains even after removing them.

Arduino-Version 1.8.13, latest and updated libraries and boards. Any help please?

Weather Station version

master

Hardware

D-Stike 32

jowiemann commented 3 years ago

Hello,

replace in OpenWeatherMapForecast.cpp, OpenWeatherMapCurrent.cpp, AerisObservations.cpp, AerisForecasts.cpp and AerisSunMoon.cpp the line

if(client.connect(host, port)) {

with

if defined(ESP8266)

if(client.connect(host, port)) {

else

if(client.connect(host.c_str(), port)) {

endif

Greetings Jörg

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

marcelstoer commented 3 years ago

There's preliminary support for ESP32 in a dedicated branch: https://github.com/ThingPulse/esp8266-weather-station/compare/esp32

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.