http://uk.rs-online.com/web/p/products/ ... oCypfw_wcB
This looks like my model
diabeg
DirkS wrote:Sorry, that traceback doesn't make any sense to me...
Can you post the contents of sparkles.py
Code: Select all
python3 /usr/src/sense-hat/examples/python-sense-hat/rotation.py
Code: Select all
sudo apt-get install libjpeg-dev python3-pip
sudo pip-3.2 install pillowThat has already been dealt with...ShiftPlusOne wrote:Looks like it's and old wheezy image and pillow needs to be installed.
Code: Select all
sudo apt-get install libjpeg-dev python3-pip sudo pip-3.2 install pillow
I copied and pasted ,clicked enter ,nothing happened on LXTerminalDirkS wrote:That looks OK.
Did you try to run any of the example scripts?
If so, di you have any problems?
if not, can you try the following:
Open a terminal window (LXTerminal and run the following (it's a long command, so I hope you can copy and paste)Please post any error messages.Code: Select all
python3 /usr/src/sense-hat/examples/python-sense-hat/rotation.py
Yes. The hat is working *and* it also calls the same function (set_pixel) and apparently that works fine.diabeg wrote:But Sense Hat lit up in all its glorious colours
Is this a step forward?
Code: Select all
sense = SenseHat()
Yes, but the latest error pasted says that it hasn't really been dealt with. It seems like at first it was lack of pillow, then that was solved and it was an error in code, then pillow again. But yeah, it does sound like things are sorted now.DirkS wrote:That has already been dealt with...ShiftPlusOne wrote:Looks like it's and old wheezy image and pillow needs to be installed.
Code: Select all
sudo apt-get install libjpeg-dev python3-pip sudo pip-3.2 install pillow
See viewtopic.php?f=104&t=135426#p903142 for the current issue.
Can't see why that happens, that's why I want to make sure the example code runs without problems
from sense_hat import SenseHatDirkS wrote:Yes. The hat is working *and* it also calls the same function (set_pixel) and apparently that works fine.diabeg wrote:But Sense Hat lit up in all its glorious colours
Is this a step forward?
I just noticed one difference between your code and the worksheet:
Line 2 should be(note the parentheses).Code: Select all
sense = SenseHat()
Fix that and try again.
Code: Select all
set_senseDirkS wrote:You put in a bit too much code.
Remove the line before lastCode: Select all
set_sense
Aha, I think that's the result of the example code I let you run.diabeg wrote:The Hat shows
l/h top red
r/h top blue
l/h btm green
r/h btm purple
Centre in Red question mark
Code: Select all
sense.clear()Code: Select all
from sense_hat import SenseHat
sense = SenseHat()
sense.clear()
x = 4
y = 5
r = 19
g = 180
b = 230
sense.set_pixel(x, y, r, g, b)Hello DirkSDirkS wrote:diabeg wrote:the lights have switched off except a blue light just off centre which remains on
That means it's working. Blue (b) is full on, with some green.
You can try other colours by changing the values for red, blue and green. 0 is off, 255 is full on.
And of course you can now carry on with the rest of the worksheet