🤖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

    Scheduled Pinned Locked Moved Arduino
    1 Posts 1 Posters 3.5k Views 1 Watching
    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 Offline
      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

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post