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

    Lesson 1.2.1. LCD. How to create image array

    Lessons and Guides
    7
    15
    49.3k
    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.
    • DimiD
      Dimi
      last edited by Dimi

      Step 1. Download this program to convert the image into code С for the link here or GitHub here (Fig. 1);
      Note: the program requires a pre-installed NET.Framework 4.5 or newer.

      alt text
      Figure 1. Download the program from the website

      Step 2. Prepare any image format .bmp, .png or .jpg (Fig. 2);

      alt text
      Figure 2. The program folder and image

      Step 3. Drag with mouse the picture to the program icon and release (Fig. 3);

      alt text
      Figure 3. Drag and drop the image onto the program icon

      Step 4. Starts a console application which will show the status in percentage (Fig. 4);

      alt text
      Figure 4. Running the conversion process

      Step 5. After the program automatically closes and the folder appears a file with the image name and extension .c (Fig. 5);

      alt text
      Figure 5. Received .c file with array of image

      Step 6. Create a new sketch using the Arduino IDE (see previous tutorials) and save it to our folder, then move .c file in the folder with the sketch (Fig. 6);

      alt text
      Figure 6. The folder and sketch .c-file inside our folder

      Step 7. Go to the folder with the sketch and open the sketch (Fig. 7, 8);

      alt text
      Figure 7. The folder with the sketch

      alt text
      Figure 8. New sketch in the Arduino IDE

      Step 8. Use following code to connect .the c-file and display the image on the screen (Fig. 9). Note that on line 3 you need to write your name.the c-file, for example dukeprofile;

      alt text
      Figure 9. Our sketch

      Step 9. Click the Upload button (Fig. 10) in order to flash the device;

      alt text
      Figure 10. Upload the firmware to the device

      Step 10. When the device firmware is completed, the device screen will appear with the image (Fig. 11).

      alt text
      Figure 11. The image on display

      1 Reply Last reply Reply Quote 1
      • X
        xbcke1234
        last edited by

        @dimi 在 Lesson 1.2.1. LCD. How to create image array 中说:

        link

        The program that converts image into code C "link" is invalid. Could you update new one? Appreciate!

        JJJ 1 Reply Last reply Reply Quote 0
        • JJJ
          JJ @xbcke1234
          last edited by

          @xbcke1234 Hi Xbcke1234,

          Do you mean that the first link to download the files is not working ? Or do you mean you have downloaded the program and it is not working for you?

          Note that the lesson also lists a github link which has the image conversion program - it should work. I've copied the link below....

          The exe file is located in: ConsoleApplication1\obj\Release

          https://github.com/dsiberia9s/ImageToCode

          X 1 Reply Last reply Reply Quote 0
          • X
            xbcke1234 @JJ
            last edited by

            @jimit
            Thank you for the quick reply. I was mean the first download link not working as Figure 1. But after you point out the .exe file location - is work for me now. Thanks!!!

            JJJ DimiD 2 Replies Last reply Reply Quote 1
            • JJJ
              JJ @xbcke1234
              last edited by

              @xbcke1234 Hi, no problem !

              Be sure to check out Dimi's recent lesson if you haven't already:
              http://forum.m5stack.com/topic/130/lesson-7-mpu9250-game-space-defense-beta

              1 Reply Last reply Reply Quote 0
              • DimiD
                Dimi @xbcke1234
                last edited by

                @xbcke1234 ok, i make new version on this week with auto size mode

                1 Reply Last reply Reply Quote 0
                • world101W
                  world101
                  last edited by

                  Is there an equivalent “image to code C” program for a Mac?

                  DimiD ajb2k3A 2 Replies Last reply Reply Quote 0
                  • DimiD
                    Dimi @world101
                    last edited by

                    @world101 sorry, I dont have Mac. maybe

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

                      @world101 在 Lesson 1.2.1. LCD. How to create image array 中说:

                      Is there an equivalent “image to code C” program for a Mac?

                      Not found one but there is an online tool.

                      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!

                      DimiD 1 Reply Last reply Reply Quote 0
                      • DimiD
                        Dimi @ajb2k3
                        last edited by

                        This post is deleted!
                        ajb2k3A 1 Reply Last reply Reply Quote 0
                        • ajb2k3A
                          ajb2k3 @Dimi
                          last edited by

                          @dimi 在 Lesson 1.2.1. LCD. How to create image array 中说:

                          @ajb2k3 https://yadi.sk/d/j9ryFVn83XXmkf

                          @Dimi - I am also a Mac users and can't use exe's

                          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!

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            paahaa @ajb2k3
                            last edited by

                            @ajb2k3 not sure if you haven't found it yet, but, on linux, I use Wine, a windows emulator with which you can execute .exe
                            Here's the link:
                            https://www.winehq.org/

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

                              @paahaa said in Lesson 1.2.1. LCD. How to create image array:

                              @ajb2k3 not sure if you haven't found it yet, but, on linux, I use Wine, a windows emulator with which you can execute .exe
                              Here's the link:
                              https://www.winehq.org/

                              Thanks, but this guide is out of date now that I have worked out and documented how to make images work.

                              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
                              • M
                                mikemoy
                                last edited by

                                This seems like a great tool, but the link no longer works.

                                DimiD 1 Reply Last reply Reply Quote 0
                                • DimiD
                                  Dimi @mikemoy
                                  last edited by Dimi

                                  @mikemoy Oh! Sorry. You can download this app here: https://ru.m5stack.com/downloads/Image2Code.exe

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