[SOLVED] PiGlow with RPI2 (retropie) not working?


#1

I’ve not long had my pi I’m a very basic user but I think I’m able to follow instructions… and still I can’t get my PiGlow to work

pi@retropie ~/PiGlow $ uname -a
Linux retropie 4.1.9-v7+ #819 SMP PREEMPT Thu Oct 1 20:47:52 BST 2015 armv7l GNU/Linux

after much digging around I read to install Gadgetoid fix

git clone https://github.com/Gadgetoid/PiGlow
cd PiGlow
sudo python setup.py install


pi@retropie ~/PiGlow $ ls /dev/i2c*
/dev/i2c-1
pi@retropie ~/PiGlow $

pi@retropie ~/PiGlow $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

pi@retropie ~/PiGlow $ sudo i2cdetect -q -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- 54 -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

pi@retropie ~/PiGlow $ sudo python test.py
White: 10
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    piglow.white(val)
  File "/home/pi/PiGlow/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 "/home/pi/PiGlow/piglow.py", line 33, in off
    self.all(0)
  File "/home/pi/PiGlow/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 "/home/pi/PiGlow/piglow.py", line 33, in off
    self.all(0)
  File "/home/pi/PiGlow/piglow.py", line 76, in all
    self.update()
AttributeError: PiGlow instance has no attribute 'update'

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

uinput
joydev
snd-bcm2835
i2c-dev

blacklist.conf

# blacklist spi and i2c by default (many users don't need them)

#blacklist spi-bcm2708
#blacklist i2c-bcm2708

If I can get it working I was hoping to mess around with python and eventually get to grips with my piglow

can anyone help? :)


#2

EDIT

curl get.pimoroni.com/piglow | bash

fixed half of my issues then setting up the autostart script had me baffled for a little while unitl i pointed it to the right script


#3

That’s exactly what I was about to recommend! The PiGlow has a few different Python libraries which makes things confusion. It looked like you were running an example for one library, with another library installed.

The one-liner installers are always the best way to go!


#4

As I said I’m new, now I need to learn how to program this awesome little device.

I’ve managed to get it autobooting

but I need to find the basics and master them :)