Ras Pi Zero and the "hats"

I have a RasPi Z (W) which I had hoped for bigger things.

I am wanting it to be an overwatcher of my network and report any problems.

That would mean some kind of “display” (LEDS) and input to control the stuff shown.

Searching I think this is a nice idea to get some NeoPixel LEDs - but now I see it isn’t.

But that could be worked around in software. Not “mission critical”.
Then there is the input.


Again: Nice.

But (typically) the people who make these seem to make them exclusive use.
Once you add one “hat” you can’t add any more.

Though there is something which may allow this - seen here:

But where is it?

Would that “doubler” work with this:

More LEDs

That is NexPixel and would (probably) work easier with the programming stuff I know.
(Is it compatible with the Nod-Red Neopixel node?)

I see you’ve had no answers, so some thoughts that might help refine your needs…

Have you any chosen software? and can you be more precise on what the buttons do and how the LEDs function.

e.g. is the LED to light if something on your network does not respond? e.g. it has lost WiFi connectivity (I’m assuming you have a WiFi network). and do you want the buttons to power cycle the device to reboot them?

Using a HAT may be a way to develop a prototype saving you any wiring and soldering skills, but have you considered how the buttons/LED on it will be pushable/viewable inside a case?

Using a PiZero and Linux it may be that a graphical (WWW) based interface to display and control things may be simpler than physical buttons.

Well, for software, it is NODE-RED.

I love it.

The LEDs will be software controlled. So one will be monitoring the WiFi status. But not quite that simply. But the example shall suffice.

The buttons are inputs for things to happen. Exactly what: Input to Node-Red and it does things as needed.

The final case is still abstract. I can’t test the idea so it is frozen in how it will be built.

The RPiZ(W) has a GUI (via Node-Red) but it is connected via WiFi. So if the WiFi is down, it won’t work.
Therefore I need a physical “display” of serious problems.
So if the WiFi goes down, it turns on a LED.

But again: If I can’t get the prototype working - because of poor hat design - I’m getting nowhere fast.

So the only critical thing here is that if WiFi is down you will not have access to the GUI to restart the Zero or at least restart the WiFi interface. That’s only one button.
The rest of the things you monitor are handled by Node-Red and the GUI. In fact if other things happen, Node-Red could trigger the action and send you an email or SMS.

You seem stuck on the HAT problem… one way around that is to use a ribbon cable with extra plugs that other HATs connect to.

BTW, on my Pi(s) I have not had a lot of success just restarting the WiFi if it looses connection.

I have done a lot of digging on the Zero and WiFi.

It would seem that how the WiFi is controlled (by default) is not the best way.

This is something I have found while searching:

/etc/network/interfaces, ifup/ifdown, the "hotplug" keyword are all **obsolete** . Even in Jessie.

What you want is the modern way of configuring network interfaces, which is event-driven: when an interface is brought up, an event is fired and dhcpcd configures networking (see /etc/dhcpcd.conf). When an interface disappears, an event is fired and dhcpcd deconfigures networking.
In a sense, it is all "hotplug" by default now.

Then there is this part:


# keep wifi alive

ping -c2 

if [ $? != 0 ] 

  sudo ifconfig wlan0 down
  sleep 30
  sudo ifconfig wlan0 up

I’m still getting familiar with that.

Suffice to say rather than locking up every couple of days (sometimes less) is now goes weeks before it locks up / panics.

I’m not sure what it is actually doing as it is headless and all I see is the green LED flashing like crazy.

So, as much as I am “fixated on the WiFi part”, I could put LEDs on to indicate other things too.

The buttons would be there to allow me to “clear” the notification/s. So they would be needed.
I see it rather slow having to boot a machine to see any problems.
Originally I was thinking of putting one of those cable displays on it, but the Zero only has camera input and no display output.

Now, you mention:

I think that is one of the questions I asked. The cable the buttons and LEDs are connected is such a cable and I can’t/couldn’t find it in the list of things.
Thus my question:

I’m getting confused, maybe I’m missing something.
Back to your original post…you found some LEDs

Searching I think this is a nice idea to get some NeoPixel LEDs - but now I see it isn’t.

but think they are not a good idea? Why?

and some buttons:

and a device to connect them both to your Zero:

I assumed that since you found the picture, you can find the part, but you ask:

Is that still a question?

then you change tracks to the Unicorn HAT

following a couple of links from ‘More LEDs’ gets you to
Getting Started with Unicorn HAT
and Pimoroni says:

Phil Howard



is the GURU
so I think the answer to your final question lies with him.


To answer you questions:

They offer eight APA102 pixels

If I am wanting to use NeoPixel LEDs, they aren’t the same thing - are they?


The picture was with the buttons - I seem to remember. (Well, it is kind of obvious seeing the buttons are in the picture.)

I was looking at the buttons and they show a couple of examples of how to use them - which is confusing. They are buttons. But anyway.

Wanting to know if the Unicorn HAT uses NEOPIXEL LEDs.

Thanks. I didn’t see it, or something.

But gee… That was 10 days ago.

I thought the idea of forums were to help one another get information.

All the same, if the hats don’t allow stacking - well that “Mini black hat” may solve this problem, but to now there is still no answer - the whole thing may get scrapped.

I am not going to buy hats which can’t be stacked to prototype a project because the whole thing is flawed because the hats won’t stack.

I’ll be brief.
Q1 and answer. From your answer they aren’t the same. Why does it matter? do you really NEED Neopixels?
Q2, Buttons aren’t all just buttons, they may be ‘capacitive touch buttons’, not physical bush buttons so need a different driver.
Q3. so what’s the description say:

64 RGB LEDs (WS2812B)

And to guess your next question, google WS2182B

Your last paragraph… Thanks I’ll stop spending the few minutes I get online each day trying to help. Don’t expect too much when you haven’t given enough information to answer your questions.

You say you want to make a prototype, it’s YOUR project, get on and make it… if it doesn’t work out how you like that’s why it was a prototype and a valuable learning experience.

BTW, I’m just an electronics hobbyist, enough attitude.

No, but NeoPixels will be a lot better than using discreet GPIO pins to control LED.

NeoPixels would also be better because Node-Red has a NeoPixel node to control them.

There used to be a little “Hat” that was a short strip of NeoPixels that plugged onto the Rpi’s GPIO pins and give you access to control the LEDs.

I came here (Core’s site) to look for what is available.
I saw the first strip and wanted to check. Is there something wrong with asking in a forum?

Q2: Ok, they are capacitive and need a different driver.
So long as they are buttons - at this level - that is good. Well, so long as they only need less than “button number” GPIO pins.
SPI, I2C, or direct. Doesn’t matter.
Of course then there is the question you raised with the inclusion of the word different.
Different to what?
Won’t the board come with the required drivers?

Good, they are NeoPixel and that will give me 64 things I can indicate - or not.
But a NeoPixel set of 64 LEDs will only need 1 GPIO pin. Not 64.

I’m not wanting to dismiss your help. But we seem to not be on the same page.

Yes it is my project. Before I get to the stage of building it, I need to know it is viable.
If I can’t get the parts to prototype it - let alone the parts to FINALLY build it - it isn’t worth me doing it.

So While I was looking at the buttons they showed a nice picture of the board which looks like a doubler for the GPIO pins.

I merely asked where it is/was.

I has opened the RasPi accessories list and was looking through it and either missed it or didn’t find it.

Again: Why is it wrong to ask for help in the forum?

If I can get the parts I need I can then get around to building it. Probably using those parts anyway as my money tree is DEAD!

I don’t see how buying two sets of things for one project is a good thing.

So all I have taken from this is that the 64 LEDs are NeoPixels - I just wanted to check - and that the board which is shown with the buttons is somewhere but not really listed here.
And that every day I am told I am stupid at least three times. Today is off to a good start. I’m already one up on the count.

I didn’t say you shouldn’t use the forum, but

  1. I encourage you to give people enough information so they can help.
  2. stick to a single question so I (or anyone reading your post) doesn’t get lost trying to understand it
  3. show that you have done some research, e.g. when you look up the things you are asking about you CAN find your own answers.

If the money tree is dead, use generic devices. Let your fingers do the walking.

When you get above a small number of lights it just becomes a light show, interpreting it will be prone to error.
If LED 34, 27 and 55 are flashing RED, and the rest of your display is green and blue, how well can you determine which devices on your network are in fault? Can you fit labels on them?

1 Like