Running Demo Code
To run the demo code, perform the following on VisionFive 2 Debian:
-
Locate to the directory where the test code, 2.4inch_LCD_demo,
exists:
-
Under the sample-code directory, execute the following command to
execute the demo code:
sudo python 2.4inch_LCD_demo
Alternatively, you can execute the following command:
sudo python3 2.4inch_LCD_demo
Result:- On the 2.4inch LCD:
- First, the following picture with the StarFive logo will be displayed for
two seconds.
Figure 1. Example Output - Then the following two official example figures will be displayed in turn.
Figure 2. Example Output
- First, the following picture with the StarFive logo will be displayed for
two seconds.
- The terminal output is as the
following.
-----------lcd demo----------- Set SPI mode successfully spi mode: 0x0 bits per word: 8 max speed: 40000000 Hz(40000 kHz) 2022-07-04 16:40:40 2022-07-04 16:40:41 2022-07-04 16:40:41 2022-07-04 16:40:42 2022-07-04 16:40:42 2022-07-04 16:40:43 2022-07-04 16:40:44 2022-07-04 16:40:44 2022-07-04 16:40:45
The output indicates:
- that the SPI mode is set successfully
- the SPI mode
- the date and time when all the above three figures are displayed
- On the 2.4inch LCD: