Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving Problems with PiGlow #24

Open
soslug opened this issue Apr 11, 2018 · 1 comment
Open

Resolving Problems with PiGlow #24

soslug opened this issue Apr 11, 2018 · 1 comment

Comments

@soslug
Copy link

soslug commented Apr 11, 2018

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

  1. Install Stretch-lite OS
  2. Access and download https://github.com/Boeeerb/PiGlow (Clone or download as appropriate)
  3. 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

@matt-the-bat
Copy link

matt-the-bat commented Apr 11, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants