🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Cannot compile M5Paper Weather sketch

    Arduino
    5
    6
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Steve1
      last edited by Steve1

      I have downloaded this sketch along with all of the XX.h files and installed them in my Arduino directory, as I have prviously done with other GIT sketches. https://github.com/Bastelschlumpf/M5PaperWeather/tree/master/weather Unfortunately I cannot get this sketch to compile, it complains that in "..../Time.h MyData was not declared in this scope"

      I have noticed that in Time.h there is the line 22 "#pragma once" which is not followed by any local XX.h files as it is in the other local libraries and .h files. I am nor familiar with" #pragma once" and am wondering if another library is supposed to declare MyData. MyData is declared as a class in Data.h.

      G F 2 Replies Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @Steve1

        looks like that issue isn't new. See here.

        Maybe try to contact the owner of the code?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • G
          GIGObug @Steve1
          last edited by

          @Steve1
          Hi,

          It seems there might be some missing libraries to install. I just don't know which ones yet...

          ajb2k3A 1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3 @GIGObug
            last edited by

            @GIGObug said in Cannot compile M5Paper Weather sketch:

            @Steve1
            Hi,

            It seems there might be some missing libraries to install. I just don't know which ones yet...

            Arduino should tell you during compile Whicker ones are missing

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            G 1 Reply Last reply Reply Quote 0
            • G
              GIGObug @ajb2k3
              last edited by

              @ajb2k3 It does to and extent. I managed to find a few libraries that needed to be installed. I'm still having trouble with DynamicJsonDocument doc(35 * 1024); in the Weather.h file. It seems the DynamicJsonDocument was deprecated, and I haven't found a good work around.
              I very much, appreciate the assistance, and I hope to stumble accross the solution soon.
              I'm working with Arduino 1.8.19, and I'm thinking this code would compile for me if I knew what version the original author was using. I am not able to DM the original author on GitHub. I'll keep trying, and post updates as I find solutions.
              Thank you.

              1 Reply Last reply Reply Quote 0
              • F
                flypeek @Steve1
                last edited by

                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.
                Config.h

                #pragma once
                #define VERSION          "Version 1.0"
                #define CITY_NAME        "City"
                // change to your location
                #define LATITUDE         47.69732 
                #define LONGITUDE         8.63493
                
                #define OPENWEATHER_SRV  "api.openweathermap.org"
                #define OPENWEATHER_PORT 80
                #define OPENWEATHER_API  "your openweathermap api key"
                
                #define WIFI_SSID        "your wifi ssid"
                #define WIFI_PW          "your wifi password"
                

                onecall is not free anymore with new accounts.
                https://github.com/Bastelschlumpf/M5PaperWeather/issues/9

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post