When I run backlight.py (sudo ./backlight.py) I get the following error:
Traceback (most recent call last):
File “./backlight.py”, line 9, in
import dothat.backlight as backlight
File “/usr/local/lib/python2.7/dist-packages/dothat/backlight.py”, line 1, in
import sn3218, colorsys, math
File “/usr/local/lib/python2.7/dist-packages/sn3218.py”, line 112, in
enable_leds(0b111111111111111111)
File “/usr/local/lib/python2.7/dist-packages/sn3218.py”, line 60, in enable_leds
[enable_mask & 0x3F, (enable_mask >> 6) & 0x3F, (enable_mask >> 12) & 0X3F])
IOError: [Errno 5] Input/output error
When I hello_world.py (sudo ./hello_world.py) it works OK.
I’m using 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l GNU/Linux
My futher discovery is:
The broblem looks like to be in the backlight module. Each time I import the module I get the message.
So where do I have to correct?
Or is there a new backlight module?
This error lookslike that at: Display-O-Tron HAT i2c problem
I have tried to reactivate i2c and reboot and run the backlight.py-program and still get the error.
I used this command:
curl get.pimoroni.com/dot3k | bash
and I get the following result:
/home/pi/Pimoroni
/home/pi/Pimoroni/dot3k
/home/pi/Pimoroni/dot3k/dot3k
/home/pi/Pimoroni/dot3k/dothat
/home/pi/Pimoroni/dot3k/dothat/advanced
/home/pi/Pimoroni/dot3k/dothat/basic
/home/pi/Pimoroni/dot3k/dothat/basic/backlight.py
/home/pi/Pimoroni/dot3k/dothat/basic/graph.py
/home/pi/Pimoroni/dot3k/dothat/basic/hello_world.py
/home/pi/Pimoroni/dot3k/dothat/basic/room.py
/home/pi/Pimoroni/dot3k/dothat/basic/touch.py
I hav tried to reload the the program but I always get the same error.
hum, the HAT should give you a different fingerprint… are you sure you are using the Display-o-tron HAT and not the display-o-tron 3000? if so you should use the examples in the dot3k/dot3k directory.
I change the DisplayOTron Hat to an other Raspberry Pi B+.
I install nessecery programs and run backlight.py
Voila! It run OK.
My conclusion is that either is the first RPi doesn’t work corectly or for some reason the program failed/loaded wrong.
You could try to use the SD in your other Pi, that should confirm that your Pi is OK.
I have noticed in your listing that there is a file that is not in the repo:
/home/pi/Pimoroni/dot3k/dothat/basic/hello_world.py
Perhaps it used to be, but that would suggest you may have an older version. You could try to re-run the installer answering ‘yes’ to all questions requesting to reinstall.
… other than that I’m not sure, but my hunch is that i2c is failing as the reason for my earlier question was that I was expecting the captouch chip to show up in 0x2c.