This library has been archived and replaced by a new library:
https://github.com/adafruit/Adafruit_CircuitPython_PCD8544
This library is no longer supported. Please use the new library.
Python library for the using the Nokia 5110/3310 monochrome graphic LCD with a Raspberry Pi or Beaglebone Black.
License: MIT License
This library has been archived and replaced by a new library:
https://github.com/adafruit/Adafruit_CircuitPython_PCD8544
This library is no longer supported. Please use the new library.
I'm trying to use an adapted script to power a Nokia 5110 on an Intel Edison (Yocto Poky running on Sparkfun blocks not Arduino). The script is basically shapes.py
with the following configuration:
# Edison hardware SPI config:
#DC = 36
#RST = 48
#SPI_PORT = 5
#SPI_DEVICE = 1
# Edison software SPI config:
SCLK = 10
DIN = 11
DC = 36
RST = 48
CS = 23
But it fails on line 28:
>>> disp = LCD.PCD8544(DC, RST, SCLK, DIN, CS)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-i686/egg/Adafruit_Nokia_LCD/PCD8544.py", line 60, in __init__
File "build/bdist.linux-i686/egg/Adafruit_GPIO/GPIO.py", line 426, in get_platform_gpio
RuntimeError: Could not determine platform.
Line 60 in PCD8544.py is: self._gpio = GPIO.get_platform_gpio()
. I note that your library is supposed to use mraa
to identify platform. When I call mraa.getPlatformName()
I get 'Intel Edison'
...
Any idea what the problem is here?
If it helps:
root@edison:/usr/lib/python2.7# python platform.py
Linux-3.10.17-poky-edison+-i686-with-glibc2.0
I am new to Raspberry Pi and Python, and this is my second project. I did everything exactly as it is written in Adafruit's tutorial (https://learn.adafruit.com/nokia-5110-3310-lcd-python-library), but the code only returns a runtime error:
pi@raspberrypi ~/Adafruit_Nokia_LCD/examples $ sudo python image.py
Traceback (most recent call last):
File "image.py", line 58, in
disp = LCD.PCD8544(DC, RST, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=4000000))
File "/usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-0.7.1-py2.7.egg/Adafruit_GPIO/SPI.py", line 42, in init
self._device.open(port, device)
IOError: [Errno 2] No such file or directory
I don't really know what to do or even where to ask for help. I would be grateful if you could help me what to do.
The tutorial at https://learn.adafruit.com/nokia-5110-3310-lcd-python-library/usage
fails with a file not found error on the step running the line "sudo python setup.py install".
This is on a clean Raspbian image (the new version, supporting Pi 2).
I was able to figure out that it was missing the python-dev package, and get it working by executing "sudo apt-get install python-dev", then re-running that final line "sudo python setup.py install".
It would be great for newer users attempting to run the tutorials if you could add the step to install the python-dev package before the execution of "sudo python setup.py install".
To make this work on on BBB it was necessary to first set the pins in the correct mode : # config-pin P9_17 spi_cs; config-pin P9_18 spi; config-pin P9_22 spi_sclk
Hi,
I'm using this library on the Raspberry Pi. The main program is a Python daemon to control a programmable thermostat.
Sometimes the LCD goes blank without any apparent reason. The program is fully functional, the Python image saved as PNG is OK, but disp.image() and disp.display() seems to do nothing anymore.
Every 3 minutes - as a workaround - I re-initialize the LCD, using:
disp = LCD.PCD8544(...)
disp.begin(contrast=LCD_CONTRAST)
disp.clear()
This is effective in making the display working again, but I suffer from a file descriptor leakage: I can see an increasing number of N -> /dev/spidev0.0 into /proc/PID/fd/ and after about three days the program dies.
Is there a nice way to release the resources? Any hints on the blank LCD problem?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.