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

    Print % into label

    UIFlow
    3
    6
    7.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.
    • M5StickFreaklerM
      M5StickFreakler
      last edited by

      Hi folks

      How is it possible to print "%" into a label or onto lcd display.
      If I do so, everytime i get "%" on the display (see the slash in front of it)

      What do I wrong?

      Best regards
      Thomas

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

        It requires a bit of playing around but it is possible, I'm just struggling to find the example I made.

        Ok found it, I had posted the example on my pinterest page.
        alt text

        What I did was to use the a message box to hold the Humidity: text, you can use this box for just the % and then use text join (concat) and then a convert to string block with the value you want to be shown next to the % symbol.

        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!

        1 Reply Last reply Reply Quote 0
        • M5StickFreaklerM
          M5StickFreakler
          last edited by

          It is a bug in Uiflow (coding behind is correct)

          It works this way:
          0_1581442805138_Unbenanntes Bild.png

          labelBattery.setText(str((str((power.getBatteryLevel())) + '%'.replace('\', ''))))

          instead of

          labelBattery.setText(str((str((power.getBatteryLevel())) + '%')))

          m5stackM 1 Reply Last reply Reply Quote 0
          • m5stackM
            m5stack @M5StickFreakler
            last edited by

            @m5stickfreakler thank your feedback . we will be fix this problem as soon as posible

            M5StickFreaklerM 1 Reply Last reply Reply Quote 1
            • M5StickFreaklerM
              M5StickFreakler @m5stack
              last edited by M5StickFreakler

              @m5stack said in Print % into label:

              @m5stickfreakler thank your feedback . we will be fix this problem as soon as posible

              That would be very great. Maybe you can fix also other symbols (like degree °, umlaut and so on --> but there are not in ASCII-Table). These symbols are very often used. ;-)

              m5stackM 1 Reply Last reply Reply Quote 0
              • m5stackM
                m5stack @M5StickFreakler
                last edited by

                @m5stickfreakler Ok, I will tell the engineer these problem. Thank you

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