For the life of me I cannot get the PiGlow to work on the Pi2b
I have tried several guides(of which result in the script running and nothing at all happening with the piglow… I am told to sudo i2cdetect -y 0 which gets me “could not open file, no such file ETC”
Last thing I tried(that prompted me to sign up) was I tried gadget’s fork of which gets me this error running the test.py
sudo python ./test.py
White: 10
Traceback (most recent call last):
File “./test.py”, line 12, in
piglow.white(val)
File “/usr/local/lib/python2.7/dist-packages/piglow.py”, line 42, in white
self.update()
AttributeError: PiGlow instance has no attribute 'update’
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “/usr/lib/python2.7/atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
File “/usr/local/lib/python2.7/dist-packages/piglow.py”, line 33, in off
self.all(0)
File “/usr/local/lib/python2.7/dist-packages/piglow.py”, line 76, in all
self.update()
AttributeError: PiGlow instance has no attribute 'update’
Error in sys.exitfunc:
Traceback (most recent call last):
File “/usr/lib/python2.7/atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
File “/usr/local/lib/python2.7/dist-packages/piglow.py”, line 33, in off
self.all(0)
File “/usr/local/lib/python2.7/dist-packages/piglow.py”, line 76, in all
self.update()
AttributeError: PiGlow instance has no attribute ‘update’
ive done all the edits of files etc… im at a loose end now. I am pretty much a noob at this too. However I have the displayotron and that works fine
sorry, don’t know much about this stuff (yet) though I’d say it’s not picking up your Piglow at all, i.e the output of i2cdetect looks like a flat line (to me). Maybe it’s defective?
yeah, I am starting to think that it was DOA as it didn’t work on the B+ - My friend has the original B and I have asked him to pop around with it at some point so we can test it. Thanks
well, I don’t know why you are running this command… are you following some tutorial, if so can you share the link?
the displayotron does not use i2c (it uses the pins but not as such) so yes, you’d get no response from i2cdetect. I don’t know about the Piglow, they share the SN3218 and maybe it’s normal you don’t get an address returned for it either.
So I guess the main question if i2cdetect is even relevant, I assumed it was since you mentioned it, pointing out that you were probing the wrong bus, but it may ge completely irrelevant.
I have just tried my dot3k and i2cdetect returns nothing, so that is normal. The following link does mention specifically i2c for the Piglow, so my expectation is that you should get some output:
… I’ll dig around the code on github if I can find a definite answer, though either way that won’t help you much resolving the issue (but perhaps will help determining if it is worth persevering).
actually, I stand corrected, the SN3218 does use i2c. But like I said my dot3k does not return anything using i2cdetect, nor does yours, and both work fine, so I don’t think there is anything wrong with the output of your Piglow being blank (or what I interpret as blank).
sorry I couldn’t be much help, you’re better off waiting for Phil to hit the office on Tuesday rather than listening to my ramblings. DO feel free to share any resource you are using to troubleshoot though, maybe a penny will drop in my little skull ;-)
yes, according to the shop link, the Piglow i2c address is indeed 0x54.
… I’m a bit confused by your resources though, they seem to be totally independent from pimoroni. Not that there is something wrong with that, but perhaps there are some incompatibilities with this forked code and the Pi2 or recent Raspbian. It seems to be rather old.
out of interest, did you run rpi-update? Not that I recommend you do, but I believe some users have had some issues after doing it.
OK, I had a good look at all the repo on github and it’s clear Phil aka Gadgetoid is working on a major update to the piglow lib… I would expect it to be WIP though.
I would sit tight and wait for him to chime in, either helping you rolling back to Boeeerb’s piglow Python lib, or moving forward with his own pimglow. You can find some details here: https://github.com/Gadgetoid/python-piglow
… that said, if you follow the instructions there, you should be able to modify the examples you are working with, using ‘import pimglow as piglow’ but take this with a pinch of salt, I don’t have any way to verify that it works (having no Piglow to test with).
Ahoy! Indeed… I’m working on some pretty massive refactoring and changes to PiGlow- not because anything is broken, but because we don’t really have an “official” solution to getting a PiGlow up and running which we can point to.
Not seeing PiGlow/Dot3k when using i2cdetect -y 1 is normal- PiGlow is a write-only device, so it doesn’t respond to the reads that i2cdetect normally uses to try and detect devices.