Raspberry Pi (6) Nokia 5110 LCD

Nokia 5110 LCD表示するための設定

最初の参考文献で、下記のコマンドを実行

cd /home
sudo apt-get update
sudo apt-get install python-pip python-dev build-essential
sudo pip install RPi.GPIO
sudo apt-get install python-imaging
sudo apt-get install git
sudo git clone https://github.com/adafruit/Adafruit_Nokia_LCD.git
cd Adafruit_Nokia_LCD
sudo python setup.py install
Adafruit examples programsを実行:
pi@raspberrypi:~/Adafruit_Nokia_LCD $ cd examples/
pi@raspberrypi:~/Adafruit_Nokia_LCD/examples $ python shapes.py
Traceback (most recent call last):
  File "shapes.py", line 60, in <module>
    disp = LCD.PCD8544(DC, RST, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=4000000))
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/SPI.py", line 42, in __init__
IOError: [Errno 2] No such file or directory

困りました!
もしかしてと、昨日のRaspberry Pi (9) Red LED Matrix Moduleを見直し、spi->> Onが必要と気づいた。

  • spi ->> On

これて、Adafruit examples programsを実行に問題なく表示できた。

参考文献

  1. http://projects.privateeyepi.com/home/home-alarm-system-project/nokia-5110-lcd-project

Leave a Reply

Your email address will not be published. Required fields are marked *