-
Notifications
You must be signed in to change notification settings - Fork 54
Description
I have now tested this repository with Stretch-lite install, I have found two issues which are easily resolvable.
First issue:
ImportError: No module named piglow
sudo apt install python-piglow python3-piglow
On it's own this will not resolve the problem and leads us to the second issue which is that, you also need edit each of the python files and replace two of the entries listed, the majority of the code is still valid so in the case of arm.py for example simply replace.
Second issue:
Code itself example from arm.py.
from piglow import PiGlow
from time import sleep
piglow = PiGlow()
replace with:
import piglow
from time import sleep
piglow.auto_update = True
This should work whether the base OS is Stretch-lite or Stretch-desktop, however for clarity I will provide for those who are interested an Install procedure for Stretch-lite which should work equally well for Desktop version. I wish to acknowledge the author of code in Pimoroni github site as I am not smart enough to resolve the issue detected without looking at their code. However the base install script supplied by Pimoroni as of the date of this article out of date and has not been updated from jessie OS so script might not work on Stretch OS
ref: https://github.com/pimoroni/piglow
- Install Stretch-lite OS
- Access and download https://github.com/Boeeerb/PiGlow (Clone or download as appropriate)
- Install dependencies as listed below using "sudo apt install" or "sudo apt-get install"
sudo apt install python-pip python3-pip
sudo apt install python-smbus python3-smbus
sudo apt install python-psutil python3-psutil
sudo apt install python-piglow python3-piglow
sudo apt install python-numpy python3-numpy
sudo raspi-config
select option 5 = Interfacing Options
select option p5 = I2C please enable if not already done so
Then modify all of boeeerb's fine code to include the top and bottom changes to the code itemised above. These are literally the only changes I made to run this fine selection of programs. Perhaps Boeeerb will update their post at post at some point. I hope this article will help someone else discover to discover the joys of piglow.
I can confirm the above works on Raspberry Pi version B (very old but still works)
Remember to use python piglowappname.py or
python3 piglowappname.py