OK so I am back again with my Unicorn pHAT issues and I am following the official Pimoroni tutorial and i follow it just as it is. So i have put this in so far
import unicornhat as uh
uh.set_layout(uh.PHAT)
for x in range(8):
for y in range(4):
uh.set_pixel(x, y, 0, 255, 255)
uh.show()
Now the problem I’m getting is as I put in uh.show() it gives me a syntax error like this
File "<stdin>", line 4
uh.show()
^
SyntaxError: invalid syntax
I don’t get why this is wrong so can someone please help me as this is the same as what it says to do and I am still a beginner for coding I think. Thank You.
I can later (not on my pi right now) but I tried on the python 3 app itself and it still gives a syntax error but says something else. I forgot what that was but I will send it soon. Unless you can manage to make yours stop working! Maybe it’s something to do with the software I am using. I’m using raspian Jessie. But I wouldn’t expect that to change anything since it’s still python. Strange.
I am having the same issue with a Mood Light kit I just picked up last week. I got the blinking example to work just fine from the walk through but I did not get this example to work. I plan to use it as a night light for one of my daughters and honestly I am extremely new to coding.
I am going to try and get pictures of what is happening on lunch. I have tried using two separate keyboards. @gadgetoid what all would you need to see in the pictures?
I think that the issue is that the uh.show() is still within the for loop even though it looks like it’s not. When you’ve typed the uh.set_pixel(x, y, 0, 255, 255) line, you have to press enter twice to get it to close the for loop. Then, if you type the uh.show() line and press enter, it should work. :-)