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

    Move the screen position of the "TFT_Meter_linear" example

    Arduino
    1
    1
    3.0k
    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.
    • W
      wadoadi
      last edited by wadoadi

      Hi,
      in the Arduino IDE working with an M5Stack Grey I have reduced the size of the meter to 0.65
      // Define meter size as 1 for M5.Lcd.rotation(0) or 1.3333 for M5.Lcd.rotation(1)
      #define M_SIZE 0.65

      this gives me approx the correct size, however, I would like to move the meter from the top left of the screen to the bottom right. ideally, I would like to pass the XY to it.

      Ultimately I would like two 0.65 meters on the screen at the same time. bottom left and bottom right.

      I thought the parameters below would do this but alas they do not!
      float ltx = 0; // Saved x coord of bottom of needle
      uint16_t osx = M_SIZE * 120, osy = M_SIZE * 120; // Saved x & y coords

      any advice would be most welcome!

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