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

    SHT30 return convert to F

    Arduino
    2
    3
    1.4k
    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.
    • M
      Meldrak
      last edited by Meldrak

      Hi!

      I am using my M5Paper as a weather dashboard using a sweet github project by Bastelschlumpf (project link

      I live in the very backwards USA where we use Fahrenheit, miles, etc. I was able to modify the project to return data in F and mph, but I cannot figure out how to get the SHT30 temperature data to convert to F. Can anyone please look at the code and files and tell me exactly where and how to add a conversion code? I am very new to coding and need exact instructions like change line 435 in X.h to "code here", etc.

      Thanks!

      teastainT 1 Reply Last reply Reply Quote 0
      • teastainT
        teastain @Meldrak
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • teastainT
          teastain
          last edited by teastain

          Did you get it sorted?
          I started to post the formula, but I realized that you need to edit the application. I say “application” because it is confusingly written in an advanced, professional C++ style, not the fun Arduino IDE style where everything is spelled out and you just edit the line.
          I mean: the loop is empty. (!)
          I don’t have a ePaper to try it.

          SHT30.h line 30:
          myData.sht30Temperatur = (int) M5.SHT30.GetTemperature() * ((9.0 / 5.0) + 32.0);
          -Terry

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