
https://github.com/rm-hull/luma.oled oled驱动程序
https://github.com/rm-hull/luma.examples 示列
详细介绍在文件目录下的README.rst中
执行以下命令进行安装
- 1.$ sudo usermod -a -G i2c,spi,gpio pi //【好像没什么用】
- 2.$ sudo apt install python3-dev python3-pip python3-numpy libfreetype6-dev libjpeg-dev build-essential //【安装依赖包,树莓派中好像已经有了】
- 3.$ sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libportmidi-dev //【安装依赖包,树莓派中好像已经有了】
-
- 4.Log out and in again and clone this repository:: //【退出,重新进入】
-
- 5.$ git clone https://github.com/rm-hull/luma.examples.git //【在树莓中下载代码包】
- 6.$ cd luma.examples
-
- 7.$ sudo -H pip install -e . //【上述步骤完成后,执行些程序(跳过上面步骤直接执行此好像也可以,会出现下载错误,多次执行(注意 -e . 后面的点)】
运行方式: 进入luma.examples目录下 执行选择下列进行执行
使用SPI接口
python3 animated_gif.py --interface spi 或 -i spi
使用I2C 接口
python3 animated_gif.py --interface i2c 或 -i i2c
使用pygame 在桌面上显示
python3 tv_snow.py -d pygame

animate_gif.py

font_awesome.py

demo.py

grayscale.py

tv_snow.py

pi_logo.gif

录像与显示 py