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

    Graphic functions not working

    Scheduled Pinned Locked Moved Arduino
    2 Posts 2 Posters 4.1k Views
    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.
    • F Offline
      flyceo
      last edited by

      Hi there,

      I am new to M5Stack but already programmed some stuff for esp8266 using platformio.

      I loaded all the necessary libs and board definitions and tried a short script:

      #include <M5Core2.h>
      
      void setup(){
      
        // Initialize the M5Stack object
        M5.begin();
      
        // LCD display
        M5.Lcd.print("Hello world!");
        
      }
      
      // the loop routine runs over and over again forever
      void loop() {
          M5.update();
      }
      

      Everything worked as expected.
      But then I added some Code like this:

      M5.Lcd.fillRect(10, 10, 100, 100, TFT_YELLOW);
      

      or this:

      M5.Lcd.fillScreen(TFT_RED);
      

      and suddenly the screen stay black. You can only see the backlight working. When I remove the fill... rod draw.... part, it works again. What am I doing wrong?

      Thanks,
      Roland

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @flyceo

        not sure what's going on on your side as your code runs and works fine here - using PlatformIO as well. I see the text and the yellow square just fine.

        What does your platform.ini look like?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        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