I just got my hands on a new Unicorn HAT, a GPIO cable, and a box header for my Raspberry Pi 2. I (think I’ve) got it all set up, however I don’t get any LED output when plugged in to the GPIO cable. When the HAT is plugged directly into the Pi things work as expected. Any thoughts?
(Just FYI, in case anyone’s interested, the way I’ve got this set up is the HAT is command-stripped to the back of a MacBook Pro lid and is outputting lights through the Apple logo. The reason I’d like to use the cable is that the Pi doesn’t sit flush on the hat because of its thickness.)
Presumably this is because the GPIO cable is reversing the pins.
You would have to plug the Unicorn HAT into the top of the GPIO cable - obviously physically impossible - for the rows of pins to be the right orientation. Or the GPIO cable into the top of the Unicorn HAT … also physically impossible, but hopefully picturing this will show you what might be amiss.
To be honest, it’s because I’m not very experienced with electronics. If I knew how, I totally would. Is there any easy way to do that, or would it require soldering? (which I should probably learn anyways, however)
EDIT: Just found out about jumper wires. These seem to be the way to go. Any objections?
jumper wires would work, at least to test out. How to secure them is another matter, if you post a pic of your idea/design I might be able to give you my take on how to go about it in my view.
Here’s a link to an imgur album featuring the setup. In order from top to bottom:
The setup on the wall
A view from behind
Back of setup taken down from wall
A view of the “issue” (which, frankly, isn’t an issue because the setup still works, but I can’t imagine this situation is any good for the Pi or the HAT)
My view of a better setup (sans jumper cables because they’re on the way from Amazon)
you need 5v from pin 2 (or 4), ground from pin 9, and PWM from pin 12 (BCM18).
… when you get your cables I think you’ll see the problem, namely that the jumper cables sitting in the HAT are too loose to be secured in position long term.
I’ll try to post a possible permanent solution over the weekend if you’re not afraid to get your soldering iron out!
there you go (I was bored), custom made cable by itself, then clipped on HAT and Pi!
I tend to use female to female jumpers for those type of jobs, it’s easy to unsleeve their terminal and they give you a nice solid anchor to soak solder into.
Hey, thanks again so much for all of the help! I’ll definitely keep this in mind. Unfortunately, I lack soldering skills (and an actual soldering gun, as a matter of fact), so this might prove difficult. I’ll see if I can keep the wires in there on their own if possible, but if not I’ll definitely refer to these pictures etc.
On a slightly related note, how do I know which wires to solder? I don’t have a fancy case with labels for the GPIO pins like you do, how can I tell which pins are which?
I tried pins 4+6+18, it took aeons to figure out why it wouldn’t work.
Why MUST it be pin 9?
I know it hardly matters, but ground is ground, why the specific pin?
Because the PCB assumes a Raspberry Pi as host, and traces are routed as most practical for the board. I agree it makes things harder for less common applications but that’s the reality.
Unicorn HAT has a big fat isolated ground trace running from this pin to part of the slow-start circuit. This circuit uses a transistor and capacitor to slowly allow current into Unicorn HAT to charge the dozens of capacitors on the board without the inrush current browning out the Pi instantly. I didn’t design the board, so I don’t know exactly why there’s a dedicated trace for this, but it’s there!