Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Display the CPU temperature of the raspberry pi card on qt
Forum Updated to NodeBB v4.3 + New Features

Display the CPU temperature of the raspberry pi card on qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 948 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    julie546
    wrote on last edited by julie546
    #1

    Hi all ,
    I am working on the raspberry pi 4 card with the qt I used a lot of sensors so I'm afraid that the card heats up so I would like to display the CPU temperature of the raspberry pi card on qt, j did a search on the internet but found nothing.
    can you help me please

    jsulmJ 1 Reply Last reply
    0
    • J julie546

      Hi all ,
      I am working on the raspberry pi 4 card with the qt I used a lot of sensors so I'm afraid that the card heats up so I would like to display the CPU temperature of the raspberry pi card on qt, j did a search on the internet but found nothing.
      can you help me please

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @julie546 said in Display the temperature of the raspberry pi card on qt:

      temperature of the raspberry pi card

      What would that be? CPU temperature?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        If you mean CPU temperature, it can be read from: "/sys/class/thermal/thermal_zone0/temp". It returns temperature in C * 1000. So 53069 means 53.069 degrees Celsius.

        (Z(:^

        J 1 Reply Last reply
        5
        • sierdzioS sierdzio

          If you mean CPU temperature, it can be read from: "/sys/class/thermal/thermal_zone0/temp". It returns temperature in C * 1000. So 53069 means 53.069 degrees Celsius.

          J Offline
          J Offline
          julie546
          wrote on last edited by julie546
          #4

          @sierdzio yes CPU temperature, theres any exemple please, i would like to display that on the QT

          jsulmJ 1 Reply Last reply
          0
          • J julie546

            @sierdzio yes CPU temperature, theres any exemple please, i would like to display that on the QT

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @julie546 You simply read the file /sys/class/thermal/thermal_zone0/temp
            https://doc.qt.io/qt-5/qfile.html

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            3

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved