Running Demo Code
To run the demo code, perform the following on VisionFive 2 Debian:
-
Locate to the directory where the code, led.py, exists:
-
Under the sample-code directory, execute the following
command:
sudo python led.py
Alternatively, you can execute the following command:
sudo python3 led.py
-
Enter the period (unit: second) to configure the time when the LED is turning off or
on.
For example, enter 2. The following is the example output:
[riscv@fedora-starfive sample-code]$ sudo python3 led.py Enter delay(seconds): 2
Result:The LED turns on and off in 2 second intervals.