User Tools

Site Tools


doc:appunti:hardware:raspberrypi_thermostat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:hardware:raspberrypi_thermostat [2022/01/12 16:44] – [Starting the protherm service at bootstrap] niccolodoc:appunti:hardware:raspberrypi_thermostat [2022/01/12 17:09] – [Installing the old Adafruit LCD library] niccolo
Line 659: Line 659:
  
 ==== Installing the new Adafruit LCD library ==== ==== Installing the new Adafruit LCD library ====
 +
 +**WARNING**: Do not use this library on the old Raspberry Pi model B, it is too CPU intensive! Use the old one.
  
 **WARNING**: The new library is more CPU intensive than the old one. I opened an **[[https://github.com/adafruit/Adafruit_CircuitPython_PCD8544/issues/16|issue on GitHub]]**. So I decided to give-up with the new library and use the old one (see below for installation tips). Here you can see a CPU utilization graph, the first half is using the old library, the second half is using the new one: **WARNING**: The new library is more CPU intensive than the old one. I opened an **[[https://github.com/adafruit/Adafruit_CircuitPython_PCD8544/issues/16|issue on GitHub]]**. So I decided to give-up with the new library and use the old one (see below for installation tips). Here you can see a CPU utilization graph, the first half is using the old library, the second half is using the new one:
Line 710: Line 712:
 As reported above, the new **Adafruit CircuitPython PCD8544** library is more CPU intensive than the old discontinued one **[[https://github.com/adafruit/Adafruit_Nokia_LCD|Adafruit Nokia LCD]]**. Fortunately enough, the old library does run with Python 3, and I was able to use it on my old Raspberry Pi model B over the operating system derived from Debian 11 Bullseye. So the average CPU usage is **lower than 10%**, instead than **above 30%**! As reported above, the new **Adafruit CircuitPython PCD8544** library is more CPU intensive than the old discontinued one **[[https://github.com/adafruit/Adafruit_Nokia_LCD|Adafruit Nokia LCD]]**. Fortunately enough, the old library does run with Python 3, and I was able to use it on my old Raspberry Pi model B over the operating system derived from Debian 11 Bullseye. So the average CPU usage is **lower than 10%**, instead than **above 30%**!
  
-FIXME Describe the installation.+The library is not available from the **[[https://pypi.org/|PyPI]]** repository, so it must be downloaded from the GitHub repository. The library depends upon **Adafruit_GPIO**, which in turn requires **Adafruit_PureIO** and **spidev**. The two Adafruit libraries are available from PyPI, for **spidev** we installed the Debian packaged version. 
 + 
 +<code> 
 +apt install python3-spidev 
 +mkdir -p /usr/local/download/Adafruit-GPIO 
 +cd /usr/local/download/Adafruit-GPIO 
 +pip3 download Adafruit-GPIO 
 +pip3 install Adafruit_PureIO-1.1.9-py3-none-any.whl 
 +pip3 install Adafruit_GPIO-1.0.3-py3-none-any.whl 
 +</code> 
 + 
 +We download the library from its **GitHub repository** and install it using **pip3**: 
 + 
 +<code> 
 +cd /usr/local/download 
 +git clone https://github.com/adafruit/Adafruit_Nokia_LCD.git 
 +cd Adafruit_Nokia_LCD/ 
 +pip3 install . 
 +</code> 
 + 
 +The dependencies tree is the following: 
 + 
 +  * Adafruit_Nokia_LCD 
 +    * Adafruit_GPIO 
 +      * Adafruit_PureIO 
 +      * spidev 
 ==== Installing the Telegram Bot Python library ==== ==== Installing the Telegram Bot Python library ====
  
doc/appunti/hardware/raspberrypi_thermostat.txt · Last modified: 2022/01/12 17:11 by niccolo