To run the demo code, perform the following on VisionFive
2 Debian:
-
Locate to the directory where the test code, LED_Matrix.py,
exists:
-
Source into the Python3 Virtual Environment:
source ./myvenv/bin/activate
-
Execute the following command to install dependency:
python3 -m pip install pillow
-
Execute the following command to get the directory where VisionFive.gpio exists:
python3 -m pip show VisionFive.gpio
Result:
Location: /home/user/myvenv/lib/python3.11/site-packages
Note:
The actual output depends on how the application is installed.
-
Execute the following to enter the directory, for example,
/home/user/myvenv/lib/python3.11/site-packages
as indicated in the previous step output:
cd /home/user/myvenv/lib/python3.11/site-packages
-
Execute the following command to enter the sample-code directory:
cd ./VisionFive/sample-code/
-
Under the sample-code directory, execute the following command to
run the demo code:
sudo python LED_Matrix.py
Alternatively, you can execute the following command:
sudo python3 LED_Matrix.py
Result:The Led Matrix module displays with the StarFive logo.
Figure 1. Example Output
-
(Optional) Exit the Python3 Virtual Environment.