Scroll Phat HD problems


I am having real trouble getting my scroll phat hd to work with my pi zero v1.3. My os is retropie (raspbian)

I run the installer and everything goes fine until it tries to install,

Smbus for python 3

Smbus for python 2

Once I finish the install, including the demos, the only thing I am able to do is the instruction on the setup page for lighting one pixel.

Everything else returns syntax errors.

Can someone please help me

Worth mentioning that under the scroll phat HD I have a on off shim which works perfectly and a Waveshare USB hub. Could the hub be causing a conflict on the gpio pins causing the install of smbus 2 & 3 to fail during the install?

The on off shim pinout is here
OnOff SHIM at Raspberry Pi GPIO Pinout
And the Scroll hat HD here
Scroll pHAT HD at Raspberry Pi GPIO Pinout
I don’t see any conflicts.
Couldn’t find one for the Waveshare, not sure if it uses any GPIO pins?

The Sbuse install error message may help, as would the syntax error your getting.

This is the gpio layout for the hub I believe but I haven’t the knowledge to see a conflict

Those are the errors I receive on installation

EDIT: scratch that, I misread the Pimoroni guide. That said, I’d still guess that prefixing your command with sudo would fix it. If you’re able to set individual pixels then the fundamentals must be working fine.

Everything else returns syntax errors.

Can you post the exact command you run, and the syntax error?

That USB Hub pinout you posted is just a listing of what each GPIO pin on the Pi is / does. It’s not showing if any are used by the Hub.
It’s basically this.
Raspberry Pi GPIO Pinout
Best guess is the hub doesn’t actually use any of the pins it just passes them through. It just plugs into the Pi Zero’s USB data port with a cable of dongle thingy.

As Shoe hinted at the OS being used likely has something to do with your issues.

Ok so I have got it to work. The instructions don’t state where to insert a tab or where to press enter. All is now working as it should be thankfully and I currently have my sons names rolling across it. Strangest thing is still why the errors appear on installation when it clearly has got everything installed that it needs.

On a side note, is there a way to leave the animation running, but exit the terminal and get back into emulation station, so my boys can play their games and still have something displaying on the phat?

Thanks for all the help so far, really appreciate it

Glad you got it working. The indentation is a part of the Python language rather than ScrollPhatHD. I don’t do a lot of coding in the Python REPL, but as far as I can see if the line starts with “…” then Python thinks the code is part of the indented block underneath for y in range(7):, but you still need to manually do the intentation. To use outside the indentation block, press enter again after setting the pixel, which should break you out of the indentation.

is there a way to leave the animation running, but exit the terminal and get back into emulation station

Probably the easiest way to do that is to put the code into a python script file, and then run that from the terminal as a background process.

In the terminal, instead of running Python, type nano to open a new file called in the nano editor. Type your code into that, and then press Ctrl-X to exit (when it asks if you want to save, choose yes). Then you should be able to run the Python script in the background using the command python &.

I’m assuming here that when you run emulation station it doesn’t actually close that terminal session, it just opens ES in front of it, but I may be wrong about that.

Thanks for that, I will definitely give that a try and report back. Geez I would never have figured that out, it’s my first time dealing with python, until today I thought that a python was a snake lol

Heh yes, programming languages take a bit of learning, but of the common languages Python is widely regarded as one of the easier ones. There are tons of resources about for it, or forums like this usually have people who are happy to help out.

Thank you Shoe, as soon as the kids are asleep, I’ll try get the background script working. If this is one of the easier then i don’t think my old brain is designed for this lol.

I managed to get an example to load on boot.

I opened,

“sudo nano /etc/rc.local”

and added,

“sudo python /home/pi/Pimoroni/scrollphathd/examples/ &”

just above,

“exit 0”

and upon reboot the scroll phat hd boots up on launch and displays perfectly, even while emulation station is running.

Next step is to learn to create my own animation and scrolling text using the instruction you gave, and have that load up instead of the example.

Very happy!

I’m glad you got it working. Just FYI, the Raspberry Pi Foundation makes a lot of good resources for learning to use Python on the Pi available in book or free PDF form. If you want to make animations then you’ll need to use lists, flow controls like loops and so on.

Brilliant, thanks for that, I just downloaded them. Plenty of lockdown reading 👍