目标
通过sensehat的手柄移动光标,led点阵相当于屏幕,按下按键,切换颜色,摇动树莓派清屏。
Etch a sketch
Press the joystick button to cycle through colors (at least red, green, blue, white, unlit). Move thejoystick to draw with the chosen color. Shake the Pi to erase the screen (using the accelerometer).
效果

sensehat C语言 库
https://download.youkuaiyun.com/download/renzemingcsdn/54851536
源码
https://download.youkuaiyun.com/download/renzemingcsdn/62579279
利用Sensehat手柄控制屏幕光标,实现颜色循环、绘画功能,通过摇动树莓派使用加速度计清屏。C语言库源码分享。
3051





