I bought a 4.2-inch ink screen on Xianyu for more than ten yuan and made an exclusive e-book as a gift for a friend who likes writing.
In the previous video messages, many friends used the internal FLASH for storage and there was too little, so I made this version with a TF card.
When I started working on this project, I originally planned to buy some txt reading code from other bloggers, but after searching around, I found that all the similar projects I could find only had firmware and no open source source code, which was very embarrassing.
I had to do some research myself, and it was actually very simple.
The main thing is to understand the characteristics of UTF-8 encoding. The 0xB0 to 0xF7 encoding is Chinese characters. One character occupies three bytes. The other characters are English characters, and one character occupies one byte.
According to this rule, it is ok to create indexes and read characters, and then control line wrapping and page turning according to the screen size and font size.
The screen that the director used was bought from Xiaohuangyao https://m.tb.cn/h.fqbYFvA?tk=89O92SqRhIO . It has the same driver as Wei Xue’s 4.2-inch screen, but the cable placement and direction are different.
The code uses the GxEPD2 library driver, and the Arduino IDE library management can be downloaded directly.
The three-color 4.2-inch ink screen uses a black and white screen driver, so the refresh speed will be relatively faster.
The TF card tested was a 32G card. In fact, a 1G or 2G card is enough, no matter how big it is.
The file was tested on a 13MB TXT file. It takes a few minutes to create the index file. Larger files will take longer to create the index file.
I haven't had time to make the shell yet, but it feels like it would be very cool to run naked like this.
One of the flying wires in the picture has been modified. There may still be bugs, please give me more advice, but they may not be corrected, hahaha.
The text must be UTF-8 encoded and the file name is txt.txt before it can be read by the program. When updating the file, you need to delete the SY.TXT file to recreate the index file.
Video introduction viewing address
https://www.ixigua.com/7084521156958487047?logTag=4771fd83136a44e8c6c7
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet