执行演示代码
执行以下操作,以在昉·星光 2的Debian系统上运行演示代码:
- 找到测试代码edge_detection_with_LED_Matrix.py所在的目录:
- 在sample-code目录下,执行以下命令以运行演示代码:
ssudo python edge_detection_with_LED_Matrix.py
或者,您也可以执行以下命令:
sudo python3 edge_detection_with_LED_Matrix.py
结果:- 终端显示如下:
# python3 edge_detection_with_LED_Matrix.py *------------------------------------------------------* Please press the key on pin 37 to launch !!!
- 根据提示按下按键后,LED点阵将会从5开始倒计时显示5、4、3、2、1,最后闪烁显示赛昉科技的徽标,效果图如下:
图 1. 倒计时和赛昉科技徽标
- 终端显示如下: