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

    Arduino UNO + ST7789V2

    Scheduled Pinned Locked Moved Arduino
    4 Posts 2 Posters 2.0k 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.
    • M Offline
      MARKS.MILINKOVS
      last edited by

      Hello,
      I am trying to run Arduino UNO + ST7789V2(M5stack), but when I try to run just sample basic program from M5stack, I always got an error:

      internal\memory.h:13:10: fatal error: memory: No such file or directory
      include memory
      compilation terminated. exit status 1".

      I have same result on two different PC. What do I need to check?
      With wiring everything fine, and communication ok.

      Thank you in advance!

      #include <M5UnitLCD.h>
      
      M5UnitLCD display;
      
      M5Canvas canvas(&display);
      
      static constexpr char text[] = "Hello world ! こんにちは世界! this is long long string sample. 寿限無、寿限無、五劫の擦り切れ、海砂利水魚の、水行末・雲来末・風来末、喰う寝る処に住む処、藪ら柑子の藪柑子、パイポ・パイポ・パイポのシューリンガン、シューリンガンのグーリンダイ、グーリンダイのポンポコピーのポンポコナの、長久命の長助";
      static constexpr size_t textlen = sizeof(text) / sizeof(text[0]);
      int textpos = 0;
      int scrollstep = 2;
      
      void setup(void) 
      {
        display.init();
        display.setRotation(2);
        canvas.setColorDepth(1); // mono color
        canvas.setFont(&fonts::lgfxJapanMinchoP_32);
        canvas.setTextWrap(false);
        canvas.setTextSize(2);
        canvas.createSprite(display.width() + 64, 72);
      }
      
      void loop(void)
      {
        int32_t cursor_x = canvas.getCursorX() - scrollstep;
        if (cursor_x <= 0)
        {
          textpos = 0;
          cursor_x = display.width();
        }
      
        canvas.setCursor(cursor_x, 0);
        canvas.scroll(-scrollstep, 0);
        while (textpos < textlen && cursor_x <= display.width())
        {
          canvas.print(text[textpos++]);
          cursor_x = canvas.getCursorX();
        }
        display.waitDisplay();
        canvas.pushSprite(&display, 0, (display.height() - canvas.height()) >> 1);
      }
      
      robskiR 1 Reply Last reply Reply Quote 0
      • robskiR Offline
        robski @MARKS.MILINKOVS
        last edited by

        @MARKS-MILINKOVS said in Arduino UNO + ST7789V2:

        Hello,
        I am trying to run Arduino UNO + ST7789V2(M5stack), but when I try to run just sample basic program from M5stack, I always got an error:

        internal\memory.h:13:10: fatal error: memory: No such file or directory
        include memory
        compilation terminated. exit status 1".

        I have same result on two different PC. What do I need to check?
        With wiring everything fine, and communication ok.

        Thank you in advance!

        #include <M5UnitLCD.h>
        
        M5UnitLCD display;
        
        M5Canvas canvas(&display);
        
        static constexpr char text[] = "Hello world ! こんにちは世界! this is long long string sample. 寿限無、寿限無、五劫の擦り切れ、海砂利水魚の、水行末・雲来末・風来末、喰う寝る処に住む処、藪ら柑子の藪柑子、パイポ・パイポ・パイポのシューリンガン、シューリンガンのグーリンダイ、グーリンダイのポンポコピーのポンポコナの、長久命の長助";
        static constexpr size_t textlen = sizeof(text) / sizeof(text[0]);
        int textpos = 0;
        int scrollstep = 2;
        
        void setup(void) 
        {
          display.init();
          display.setRotation(2);
          canvas.setColorDepth(1); // mono color
          canvas.setFont(&fonts::lgfxJapanMinchoP_32);
          canvas.setTextWrap(false);
          canvas.setTextSize(2);
          canvas.createSprite(display.width() + 64, 72);
        }
        
        void loop(void)
        {
          int32_t cursor_x = canvas.getCursorX() - scrollstep;
          if (cursor_x <= 0)
          {
            textpos = 0;
            cursor_x = display.width();
          }
        
          canvas.setCursor(cursor_x, 0);
          canvas.scroll(-scrollstep, 0);
          while (textpos < textlen && cursor_x <= display.width())
          {
            canvas.print(text[textpos++]);
            cursor_x = canvas.getCursorX();
          }
          display.waitDisplay();
          canvas.pushSprite(&display, 0, (display.height() - canvas.height()) >> 1);
        }
        

        you aware that arduino UNO is not esp32 chip (all m5Stack is based on esp32 family)

        M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ, M5Tab, M5CardputerAdv, M5StackChan

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MARKS.MILINKOVS @robski
          last edited by

          @robski okay, and can I deal with it somehow?

          robskiR 1 Reply Last reply Reply Quote 0
          • robskiR Offline
            robski @MARKS.MILINKOVS
            last edited by

            @MARKS-MILINKOVS said in Arduino UNO + ST7789V2:

            @robski okay, and can I deal with it somehow?

            show us your setup

            M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ, M5Tab, M5CardputerAdv, M5StackChan

            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