PI PICO
Use a Pi HAT on the Raspberry Pi Pico
Being a skinflint Northerner, Les Pounder is all about reusing things, so he explains how you can use Pi HATs on the Pico.
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at http://bigl.es.
YOU NEED
Pico or Pico W Pimoroni Drum HAT 5x male-tomale jumper wires A large breadboard 2x 10Kohm resistors) Code: https:// github.com/ lesp/LXF- 304-PiTut1-Pico-DrumHAT-Shortcut-Keypad/ archive/ refs/heads/ main.zip
HATs only work on a Raspberry Pi, right? Generally yes, but sometimes they can work H with the Pico. Pimoroni’s Drum HAT is an older HAT with eight pads that can be used to perform drum solos and such. For this tutorial, we will repurpose a Drum HAT to be a USB human interface device (USB HID) via a Raspberry Pi Pico running CircuitPython.
Drum HAT’s CAP1188 capacitive touch sensor needs just four pin connections to our Pico. The problem is that the 20x2 (40-pin) configuration of the Raspberry Pi means we can’t just drop it on to a breadboard. This is where some careful snipping of header pins is required. Using header pins, a long breadboard and some jumper wires, we can connect our two I2C pins GPIO16 to SDA, GPIO17 to SCL, 3V3 to 3V3 and GND to GND. The I2C pins each require a 10Kohm resistor from the pins to the 3V3 rail of the breadboard so the pins are pulled high. See the circuit diagram in the download for clear pin locations.