Code Monkey home page Code Monkey logo

m5paper-weatherstation's Issues

Compile error

Hi,

Great job! I'm trying to compile and exec your project on my M5Paper, but when I compile it I give this error:

I'm sure the problem is in my side, but I can't found it. Can you give me any cue?

Thanks!

In file included from /Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/esp32/include/hal/i2s_ll.h:30:0,
                 from /Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_hal.h:28,
                 from /Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/i2s.h:16,
                 from .pio/libdeps/m5paper/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_Parallel8.hpp:33,
                 from .pio/libdeps/m5paper/LovyanGFX/src/lgfx/v1/platforms/esp32/Bus_Parallel8.cpp:22:
/Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:70:31: error: expected '}' before '__attribute__'
     I2S_COMM_FORMAT_I2S       __attribute__((deprecated)) = 0x01, /*!< I2S communication format I2S, correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
                               ^
/Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:70:59: error: expected unqualified-id before '=' token
     I2S_COMM_FORMAT_I2S       __attribute__((deprecated)) = 0x01, /*!< I2S communication format I2S, correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
                                                           ^
/Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:76:3: error: 'i2s_comm_format_t' does not name a type
 } i2s_comm_format_t;
   ^
/Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:127:5: error: 'i2s_comm_format_t' does not name a type
     i2s_comm_format_t       communication_format;   /*!< I2S communication format */
     ^
/Users/sanguino/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:204:1: error: expected declaration before '}' token
 }
 ^
cc1plus: warning: unrecognized command line option '-Wno-frame-address'
Compiling .pio/build/m5paper/lib1bb/LovyanGFX/lgfx/v1/platforms/samd21/Bus_I2C.cpp.o
*** [.pio/build/m5paper/lib1bb/LovyanGFX/lgfx/v1/platforms/esp32/Bus_Parallel8.cpp.o] Error 1

Update code for arduinojson 6

Function MakehttpRequest

if (httpCode == 200)  // Checking the returning code
    {
       String payload = http.getString();   // Getting the request response payload
       StaticJsonDocument<1024> doc;
       // Parse JSON object
       DeserializationError error = deserializeJson(doc, payload);
       if (error)
       {
       return;
       }
       else
       {
       
         JsonObject main = doc["main"];
         temp =        (float)main["temp"]-273.15;                      // Get temperature in °C
         humidity =    (uint_fast8_t)main["humidity"];                     // Get humidity in %
         pressure =    (uint_fast8_t)main["pressure"];            // Get pressure in bar
         visibility =  (float)doc["visibility"];         // Get visibility in m
         weatherCity = (const char*)doc["name"];

         JsonObject wind = doc["wind"];
         wind_speed =  (float)wind["speed"];                    // Get wind speed in m/s
         wind_degree = (float)wind["deg"];                     // Get wind degree in °

         JsonObject weather = doc["weather"][0];
         weatherDesc = (const char*)weather["description"];  
         weatherIcon = (const char*)weather["icon"];

         JsonObject sys = doc["sys"];
         sunrise = (time_t)sys["sunrise"];
         sunset = (time_t)sys["sunset"];
         weatherCountry = (const char*)sys["country"];
       }

NTP not working

Hi.
I change code

constexpr auto NTP_SERVER1 = "ru.pool.ntp.org";
  constexpr auto NTP_SERVER2 = "europe.pool.ntp.org";
  constexpr auto NTP_SERVER3 = "pool.ntp.org";
  constexpr auto TIME_ZONE = "UTC+3";

and i have "NTP not sync"
What am I doing wrong?

Can not compile due to LGFX

Hi

First of all, very nice project.

Unfortunately I can't compile it because the compiler doesn't know LGFX and prettyEpdRefresh, see excerpt from the log below.

I have already made the changes that led to the solution in this issue (#4). Unfortunately, that does not help for me.

Does anyone have any idea what I am doing wrong?

LGFX error:

src/main.cpp: At global scope:
src/main.cpp:60:1: error: 'LGFX' does not name a type
 LGFX gfx;
 ^~~~

prettyEpdRefresh error:

src/main.cpp:138:3: error: 'prettyEpdRefresh' was not declared in this scope
   prettyEpdRefresh(gfx);
   ^~~~~~~~~~~~~~~~

The complete Output from the build is attached.
build_output.txt

Thank you in advance.

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.