This project shows how to upload images to the LCD display of your RePhone.
RePhone Kit Create is an open source modular phone kit that changes the way we put our phone into use. It provides a new form of phone customization, and the easiest solution to wearable/IoT development.
In the application provided in this project, two images are alternately displayed on RePhone every 1s.
Step 1: DEVELOPMENT ENVIRONMENT
Step 2: CREATE a NEW PROJECT
Once the development environment is all set up, open eclipse.exe, follow THE FIRST 4 STEPS in the instructions on the wiki: 【Create your first project:hello world】
Here I name the project as "Draw image on RePhone", double click "Draw image on RePhone.c" to open it.
Step 3: DOWNLOAD THE LIBRARIES
Step 4: RESOURCE EDITOR
Lets create a new folder named "image" in the location of the project, in this folder we put in the images that we want to draw.
Do remember that the images has to be 240x240px, the format can be 24-bit bmp or JPEG(no sRGB).
Here I've put in the image 【1.jpg】 and 【2.jpg】
Now Open the resource editor in Eclipse IDE.
In the resource editor, we
1. Select 【Image】
2. Set click on 【】to add new images
3. Set the 【path】 to the images
4. 【Save】 it
Now if you refresh the project, you should be able to see an update of the file "ResID.h"
Step 5: THE CODE
Copy the code in the "Draw image on RePhone.c.txt" file to "Draw image on RePhone.c"
The code line
if(pic_number > 2)pic_number = 1;
is actually where we draw the images, the value of pic_number is initially set as 1, which represents the image Cat_1 , in the program it alternates from 1 to 2 and 2 to 1 every 1 second.
Step 6: BUILD APPLICATION
Click back to Draw Image on RePhone.c and then click【Build Application】.
Step 7: COPY VXP FILE
After successfully built the application, you should
1. find the vxp file in the location of the project : eclipse\Workspace\Draw Image on RePhone\ARM\Draw Image on RePhone_default.vxp
2. Copy it to your RePhone's storage mode, right in root location, a folder called【MRE】
3. Change the content of 【autostart.txt】to:
Step 8: TURN ON YOUR REPHONE
Now turn on your RePhone, you should be able to see your images showing on the screen.