Giter Club home page Giter Club logo

m5paperweather's Introduction

M5PaperWeather

**M5Paper project with weather information from openweathermap ***

M5PaperWeather

Description

Arduino project to show internal environment data and weather information from openweathermap https://openweathermap.org on the e-ink display of the M5Paper. Please edit the config.h file with your own data. You need an api key from openweathermap. The software shows the following information:

  • A header with version, city wifi strength and battery status
  • Sun section with sunrise and sunset
  • Moon section with moonrise and moonset
  • Wind section with wind direction and wind speed
  • The internal SH30 sensor data (temperature and humidity) with the current date and time
  • A hourly forecast with hour, temperature and a weather icon.
  • Some detailt forecast graphs with temperature, rain, humidity and pressure

Wall mount

See https://www.thingiverse.com/thing:4767014 Wall mountr

Disclaimer

I don't take any responsibility nor liability for using this software nor for the installation or any tips, advice, videos, etc. given by any member of this site or any related site.

License

This program is licensed under GPL-3.0

Thanks

m5paperweather's People

Contributors

bastelschlumpf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m5paperweather's Issues

Int type of icon arrays

Why are the icons of the type const uint8_t in the Icons.h file but the DrawIcons function in the Display.h uses const uint16_t *icon ?

Cannot be complied

Dear @Bastelschlumpf , is there any chance to fix the code?
Unfortunately it cannot be compiled, there are multiple issues.

Thank you in advance.

Arduino compile error on Time

any one get this error or know what to do about it??

In file included from /Users/andrew/Documents/Arduino/M5PaperProjects/M5PaperWeather-master/weather/Weather.h:26,
from /Users/andrew/Documents/Arduino/M5PaperProjects/M5PaperWeather-master/weather/Data.h:24,
from /Users/andrew/Documents/Arduino/M5PaperProjects/M5PaperWeather-master/weather/weather.ino:26:
/Users/andrew/Documents/Arduino/M5PaperProjects/M5PaperWeather-master/weather/Utils.h: In function 'time_t GetRTCTime()':
/Users/andrew/Documents/Arduino/M5PaperProjects/M5PaperWeather-master/weather/Utils.h:46:3: error: 'tmElements_t' was not declared in this scope
tmElements_t tmSet;

MyData not declared in this scope

Hello, when I try to compile, I get the erreor below (MyData not declared in this scope).


In file included from /home/user/Arduino/M5PaperWeather-master/weather/Utils.h:23,
from /home/user/Arduino/M5PaperWeather-master/weather/Weather.h:26,
from /home/user/Arduino/M5PaperWeather-master/weather/Data.h:24,
from /home/user/Arduino/M5PaperWeather-master/weather/weather.ino:26:
Time.h:26:21: error: 'MyData' was not declared in this scope
bool SetRTCDateTime(MyData &myData)
^~~~~~
/home/user/Arduino/M5PaperWeather-master/weather/Time.h:26:21: note: suggested alternative: 'FT_Data'
bool SetRTCDateTime(MyData &myData)
^~~~~~
FT_Data
Time.h:26:29: error: 'myData' was not declared in this scope
bool SetRTCDateTime(MyData &myData)
^~~~~~
/home/user/Arduino/M5PaperWeather-master/weather/Time.h:26:29: note: suggested alternative: 'FT_Data'
bool SetRTCDateTime(MyData &myData)
^~~~~~
FT_Data
/home/user/Arduino/M5PaperWeather-master/weather/weather.ino: In function 'void setup()':
weather:53:31: error: 'SetRTCDateTime' cannot be used as a function
SetRTCDateTime(myData);
^
In file included from /home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:42,
from /home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from /home/user/Arduino/M5PaperWeather-master/weather/Weather.h:25,
from /home/user/Arduino/M5PaperWeather-master/weather/Data.h:24,
from /home/user/Arduino/M5PaperWeather-master/weather/weather.ino:26:
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp: In instantiation of 'static T ArduinoJson::V6212PB::Converter<T, Enable>::fromJson(ArduinoJson::V6212PB::JsonVariantConst) [with T = char*; Enable = void]':
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRefBase.hpp:53:34: required from 'typename ArduinoJson::V6212PB::detail::enable_if<(! ArduinoJson::V6212PB::detail::ConverterNeedsWriteableRef::value), T>::type ArduinoJson::V6212PB::detail::VariantRefBase::as() const [with T = char*; TDerived = ArduinoJson::V6212PB::detail::MemberProxy<ArduinoJson::V6212PB::detail::ElementProxy<ArduinoJson::V6212PB::detail::MemberProxy<ArduinoJson::V6212PB::detail::MemberProxy<ArduinoJson::V6212PB::JsonObject, const char*>, const char*> >, const char*>; typename ArduinoJson::V6212PB::detail::enable_if<(! ArduinoJson::V6212PB::detail::ConverterNeedsWriteableRef::value), T>::type = char*]'
/home/user/Arduino/M5PaperWeather-master/weather/Weather.h:117:75: required from here
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:24:20: error: no matching function for call to 'convertFromJson(ArduinoJson::V6212PB::JsonVariantConst&, char*&)'
convertFromJson(src, result); // Error here? See https://arduinojson.org/v6/unsupported-as/
~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:267:13: note: candidate: 'void ArduinoJson::V6212PB::convertFromJson(ArduinoJson::V6212PB::JsonVariantConst, String&)'
inline void convertFromJson(JsonVariantConst src, ::String& dst) {
^~~~~~~~~~~~~~~
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:267:13: note: conversion of argument 2 would be ill-formed:
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:24:26: error: cannot bind non-const lvalue reference of type 'String&' to an rvalue of type 'String'
convertFromJson(src, result); // Error here? See https://arduinojson.org/v6/unsupported-as/
^~~~~~
In file included from /home/user/.arduino15/packages/m5stack/hardware/esp32/2.0.7/cores/esp32/Arduino.h:166,
from sketch/weather.ino.cpp:1:
/home/user/.arduino15/packages/m5stack/hardware/esp32/2.0.7/cores/esp32/WString.h:57:9: note: after user-defined conversion: 'String::String(const char*)'
String(const char cstr = "");
^~~~~~
In file included from /home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:42,
from /home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from /home/user/Arduino/M5PaperWeather-master/weather/Weather.h:25,
from /home/user/Arduino/M5PaperWeather-master/weather/Data.h:24,
from /home/user/Arduino/M5PaperWeather-master/weather/weather.ino:26:
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:283:13: note: candidate: 'void ArduinoJson::V6212PB::convertFromJson(ArduinoJson::V6212PB::JsonVariantConst, std::__cxx11::string&)'
inline void convertFromJson(JsonVariantConst src, std::string& dst) {
^~~~~~~~~~~~~~~
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:283:13: note: conversion of argument 2 would be ill-formed:
/home/user/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/ConverterImpl.hpp:24:26: error: cannot bind non-const lvalue reference of type 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'} to an rvalue of type 'std::__cxx11::string' {aka 'std::__cxx11::basic_string'}
convertFromJson(src, result); // Error here? See https://arduinojson.org/v6/unsupported-as/
^~~~~~
In file included from /home/user/.arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/xtensa-esp32-elf/include/c++/8.4.0/string:52,
from /home/user/.arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/xtensa-esp32-elf/include/c++/8.4.0/stdexcept:39,
from /home/user/.arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/xtensa-esp32-elf/include/c++/8.4.0/array:39,
from /home/user/.arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/xtensa-esp32-elf/include/c++/8.4.0/tuple:39,
from /home/user/.arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/xtensa-esp32-elf/include/c++/8.4.0/functional:54,
from /home/user/.arduino15/packages/m5stack/hardware/esp32/2.0.7/cores/esp32/HardwareSerial.h:49,
from /home/user/.arduino15/packages/m5stack/hardware/esp32/2.0.7/cores/esp32/Arduino.h:174,
from sketch/weather.ino.cpp:1:
/home/user/.arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:514:7: note: after user-defined conversion: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT
, const _Alloc&) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
^~~~~~~~~~~~
Multiple libraries were found for "WiFiClient.h"
Used: /home/user/.arduino15/packages/m5stack/hardware/esp32/2.0.7/libraries/WiFi
Not used: /home/user/arduino-1.8.15/libraries/WiFi
Multiple libraries were found for "SD.h"
Used: /home/user/.arduino15/packages/m5stack/hardware/esp32/2.0.7/libraries/SD
Not used: /home/user/arduino-1.8.15/libraries/SD
exit status 1
'MyData' was not declared in this scope

Arduino compile error

What libraries are required to get this to build?

Currently have libraries: Time, Moonrise, M5GFX, M5EPD, ArduinoJson, Wifi

Using Arduino IDE 1.8.6 on MacOS

/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp: In member function 'void M5EPD::BatteryADCBegin()':
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
^~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
^~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryRaw()':
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
return adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
return adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryVoltage()':
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
/Users/bfaist/Documents/Arduino/libraries/M5EPD/src/M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~

Arduino compile error

In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h: In member function 'bool Weather::Fill(const JsonObject&)':
D:\Arduino\M5PaperWeather\weather\Weather.h:127:75: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ObjectRef, const char*>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyMain[0] = root["current"]["weather"][0]["main"].as<char >();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h:128:75: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char
>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ObjectRef, const char*>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyIcon[0] = root["current"]["weather"][0]["icon"].as<char >();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h:133:84: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char
>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::ArrayRef>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyMain[i] = hourly_list[i - 1]["weather"][0]["main"].as<char >();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h:134:84: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char
>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::ArrayRef>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyIcon[i] = hourly_list[i - 1]["weather"][0]["icon"].as<char *>();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp: In member function 'void M5EPD::BatteryADCBegin()':
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryRaw()':
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
return adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
return adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryVoltage()':
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);

Has this been compiled successfully using recent library versions?

I included all the relevant libraries referenced and have been unsuccessful in compiling using M5EDP version 0.1.4 & M5Stack version 2.0.4. Not sure what I am missing here especially the first error about MyData not declared in scope as this makes no sense as "Time.h" is the only header complaining about this. Ive probably missed something obvious but would appreciate any pointers as to what I am missing.

Here are a few of the issues Im running into


First issue

In file included from /home/pi/Arduino/weather/Utils.h:23,
                 from /home/pi/Arduino/weather/Weather.h:26,
                 from /home/pi/Arduino/weather/Data.h:24,
                 from /home/pi/Arduino/weather/weather.ino:25:
Time.h:26:21: error: 'MyData' was not declared in this scope
 bool SetRTCDateTime(MyData &myData)
                     ^~~~~~
/home/pi/Arduino/weather/Time.h:26:21: note: suggested alternative: 'FT_Data'
 bool SetRTCDateTime(MyData &myData)
                     ^~~~~~
                     FT_Data

Second issue

In file included from /home/pi/Arduino/weather/Data.h:24,
                 from /home/pi/Arduino/weather/weather.ino:25:
/home/pi/Arduino/weather/Weather.h: In member function 'bool Weather::Fill(const JsonObject&)':
/home/pi/Arduino/weather/Weather.h:117:75: warning: 'typename ArduinoJson6194_F1::enable_if<ArduinoJson6194_F1::is_same<T, char*>::value, const char*>::type ArduinoJson6194_F1::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6194_F1::ElementProxy<ArduinoJson6194_F1::MemberProxy<ArduinoJson6194_F1::MemberProxy<ArduinoJson6194_F1::ObjectRef, const char*>, const char*> >; TStringRef = const char*; typename ArduinoJson6194_F1::enable_if<ArduinoJson6194_F1::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
       hourlyMain[0]    = root["current"]["weather"][0]["main"].as<char *>();
                                                                           ^
In file included from /home/pi/Arduino/libraries/ArduinoJson/src/ArduinoJson/Document/JsonDocument.hpp:9,
                 from /home/pi/Arduino/libraries/ArduinoJson/src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
                 from /home/pi/Arduino/libraries/ArduinoJson/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
                 from /home/pi/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:28,
                 from /home/pi/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
                 from /home/pi/Arduino/weather/Weather.h:25,
                 from /home/pi/Arduino/weather/Data.h:24,
                 from /home/pi/Arduino/weather/weather.ino:25:
/home/pi/Arduino/libraries/ArduinoJson/src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
       as() const {
       ^~

Third issue

/home/pi/Arduino/weather/weather.ino: In function 'void setup()':
weather:52:31: error: 'SetRTCDateTime' cannot be used as a function
          SetRTCDateTime(myData);
                               ^

Compilation issue

Hello,

I am really stuck without understanding, I have added Time library https://playground.arduino.cc/Code/Time/ but I am still unable to compile it. Do you have any tips to move as it seems pretty straight forward ?

Thanks

In file included from /home/sam/M5PaperWeather/weather/Weather.h:26,
from /home/sam/M5PaperWeather/weather/Data.h:24,
from /home/sam/M5PaperWeather/weather/weather.ino:26:
/home/sam/M5PaperWeather/weather/Utils.h:30:10: fatal error: TimeLib.h: No such file or directory
#include <TimeLib.h>
^~~~~~~~~~~
compilation terminated.
Multiple libraries were found for "SD.h"
Used: /home/sam/.arduino15/packages/m5stack/hardware/esp32/2.0.6/libraries/SD
Not used: /home/sam/.arduino15/libraries/SD
Not used: /home/sam/Arduino/libraries/SD-1.2.4
exit status 1

Compilation error: TimeLib.h: No such file or directory

Not refreshing

Hi,
great script, I got it to work. What does not work, is that the data update themselves. I am not so good in arduino, what could be the reason?

Changes with new openweathermap accounts

Vers nice work, thanks for that. unfortunately my display is full of errors and weather is not properly displayed.

I found that

uri += "/data/2.5/onecall";

onecall is not free anymore with new accounts.
We need two requests now and only get the current weather and a 5d forecast with 3h timestamps.

uri += "/data/2.5/weather";
uri += "/data/2.5/forecast";

Do you consider an update on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.