使用演示代码测试 GPIO
- 上电启动昉·星光,检查 GPIO22 的电压变化
-
在 Ubuntu 中执行以下命令,将可执行文件 test-gpio 上传到所需的单板计算机目
录,例如
test
命令:rsync ./test-gpio <User_Name>@<Board_IP_Address>:/home/riscv/test
注:-
<User_Name>
:开发板的用户名。例如:riscv。 -
<Board_IP_Address>
:开发板的 IP 地址。例如:192.168.92.133。
示例:
rsync ./test-gpio riscv@192.168.92.133:/home/riscv/test
-
-
执行以下命令在昉·星光上运行演示演示代码:
./test-gpio
以下是输出示例:
提示:-
Gpio on
:高电压 -
Gpio off
:低电压
-