Lesson 1.2.1. LCD. How to create image array
-
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.
Figure 1. Download the program from the websiteStep 2. Prepare any image format .bmp, .png or .jpg (Fig. 2);
Figure 2. The program folder and imageStep 3. Drag with mouse the picture to the program icon and release (Fig. 3);
Figure 3. Drag and drop the image onto the program iconStep 4. Starts a console application which will show the status in percentage (Fig. 4);
Figure 4. Running the conversion processStep 5. After the program automatically closes and the folder appears a file with the image name and extension .c (Fig. 5);
Figure 5. Received .c file with array of imageStep 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);
Figure 6. The folder and sketch .c-file inside our folderStep 7. Go to the folder with the sketch and open the sketch (Fig. 7, 8);
Figure 7. The folder with the sketch
Figure 8. New sketch in the Arduino IDEStep 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;
Figure 9. Our sketchStep 9. Click the Upload button (Fig. 10) in order to flash the device;
Figure 10. Upload the firmware to the deviceStep 10. When the device firmware is completed, the device screen will appear with the image (Fig. 11).
Figure 11. The image on display -
@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!
-
@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
-
@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!!! -
@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 -
@xbcke1234 ok, i make new version on this week with auto size mode
-
Is there an equivalent “image to code C” program for a Mac?
-
@world101 sorry, I dont have Mac. maybe
-
@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.
-
This post is deleted! -
@dimi 在 Lesson 1.2.1. LCD. How to create image array 中说:
@Dimi - I am also a Mac users and can't use exe's
-
@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/ -
@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.
-
This seems like a great tool, but the link no longer works.
-
@mikemoy Oh! Sorry. You can download this app here: https://ru.m5stack.com/downloads/Image2Code.exe