Scroll pHat HD

I am making the “Do not disturb sign” that was published in the March 21 edition of “the Magpi” on the raspberry pi zero.

I have soldered the Scroll pHat to the pins and run the following
“curl | bash”

(this run but i when checking packages required by IC2 interface the message “unable to install smbus for python 2! Unable to install smbus for python 3!” were received but i did receive the message “install ok installed” so thought it was ok to progress onto next stage.

To test the scroll phat i run the following
“cd ~/pimoroni/scrollphathd/examplespython3”

and received the message “cd: too many arguments”

This makes me think that the issue is with the code i have entered (copied from MagPi) and not any other issues but i am not an expert and would appreciate any help with this please.


As posted above your missing a space or maybe a / between examples and python3.
python3 /pimoroni/scrollphathd/examples/
cd ~/pimoroni/scrollphathd/examples

Thanks Alpha but no joy. Results below:

I tried putting a space or “/” after examples and still received message “-bash : cd : too many arguments”

I then tried “python3 /pimoroni/scrollphathd/examples/” and received message "python3 : can’t open file ’ /pimoroni/scrollphathd/examples/’ : [Errno 2] No such file or directory

Is the folder maybe actually scroll-phat-hd?

Same error message " -bash: cd: too many arguments"

I have tried another pi zero and another memory card and exactly the same issue. Also when installing script “curl / bash” IC2 interface the message “unable to install smbus for python 2! Unable to install smbus for python 3!” were received but i did receive the message “install ok installed” again.

I have managed to get one led lighting up by manually typing into Python terminal

import scrollphathd as sphd
sphd.set_pixel(0, 1, 0.5)

but still begs the question of what is the issue is with the command “cd ~/pimoroni/scrollphathd/examplespython3”

Hi Hitman

To answer your question:

cd ~/pimoroni/scrollphathd/examplespython3

is trying to run the change directory (cd) command with 2 arguments when it accepts 1:

  1. ~/pimoroni/scrollphathd/examplespython3

You either need to cd into the correct directory (and I think you have a missing / - see below) and then run or
run the python program from the parent directory. I.e. either:

cd ~/pimoroni/scrollphathd/examples/python3

The first line will change you into the correct directory, and not I’ve added a / between examplespython3 as examples/python3.
The second line uses the python3 program to run

Or you could do:

python3 ~/pimoroni/scrollphathd/examples/python3/

If neither work then does that directory exist? You can cd into each in turn to check or you could

cd ~/pim and press tab. If the ~/pimoroni directory exists it will auto-complete. Note if you get nothing shown press tab twice to get a list of options. Eg: cd ~/Do and tab returns nothing but double-tab provides the options or Documents/ and Downloads/ . Type a letter or two more to make it unique and tab to complete, eg: cd ~/Do tab tab w to make ~/Dow tab to show cd ~/Downloads/ etc.

On my Pi400 the pimoroni folder is labeled Pimoroni with a capital P.
cd pimoroni gets me a no such file or folder.
cd Pimoroni
cd scrollphathd
cd examples

Another way to do it is to just open in an IDE like Thonny. If you installed the with desktop version of PiOS.

Thank You Colin. A very informative answer. I will go through and update

Thanks also Alpha. I will try this too

Great news. The approach below worked.
cd Pimoroni
cd scrollphathd
cd examples

How do i clear the “blue text” from the command line?

Also I am curious to know why i was not able to get the first approach to work. For the second part “python 3” i did not start a new line (as i do not know how to) and entered space before. Is that correct?

Thanks for all this everyone i am learning a lot

cd ~/Pimoroni/scrollphathd/examples/

Your first try didn’t work for two reasons. One was you typed pimoroni instead of Pimoroni. And two, it was two separate commands that needed to be entered one after the other.
python3 Pimoroni/scrollphathd/examples/ should do it from the one command.

EDIT: I think doing a cd should get you back to the home folder and clear the blue text.
That or cd home, something like that, my linux skills are pretty basic.

That’s Great. Thanks everyone. Very interesting

Just curious, are you running PiOS Lite or the with desktop version?


Pi OS Lite

(20 characters min limit ;))))))))))))))))))))))))))

Ok, thanks, I had a feeling you were going to say that. It explains why you were running it from the command line. Nothing wrong with that, It does make for a nice lean install.
I probably should be using lite more often but I almost always go with the with desktop version. On my headless setups, once I’m all done getting it set to go, I just set it to boot to command line instead of the desktop GUI. It’s “almost” as good as running lite.