Contributed by WangChong, curated by Ai-Thinker
Hello everyone. This post mainly shares how to drive a 1.8-inch TFT LCD screen (SPI) with the M61. I believe that with this driver you can quickly light up your screen. I ported the SPI screen driver code provided by the original vendor so that the M61 can also use this library.

The figure above shows the library code needed to light up the screen.

The usage is simple: first include lcd_init.h, then call the LCD_Init() function. You can also check my code above; I additionally initialized a DHT11 in my code, and you can change it according to your needs.

Then call the corresponding functions.
The current library includes methods for displaying images. To use them, convert the image to a bitmap array, put the array into pic.h, and then call the corresponding image display method. 
Expected result: 
Displaying an image:

Driver code:
Attachments: 
lcd.zip(11.58 KB, downloads: 21)
Complete project [Driving an SPI screen to show temperature and humidity via DHT11]
Attachments: 
SPI_TEST (2).zip(17.96 KB, downloads: 40)
Have questions?
For other questions, please visit the unified discussion area: Ai-Thinker Discussions

