Touch pHAT review

By Russell Barnes. Posted

An easy way to add button and touch inputs to your projects

Need to add some button controls to a project you’re making? Pimoroni’s Touch pHAT makes it easy.

This Pi Zero-sized board boasts six touch-sensitive buttons which light up when pressed; white LEDs located on the underside produce a yellow/green glow through the translucent board sections.

While the buttons are marked A, B, C, D, Back, and Enter (and referred to as such when coding), each has a large white area for custom labelling with a sticker or dry-wipe marker.

The pHAT is supplied with a female header which you’ll need to solder in place. While the board has a Pi Zero form factor, it can be used with any 40-pin Pi model.

Equipped with a CAP1166 capacitive touch and LED driver chip, it uses I2C for communication, and therefore requires only two GPIO pins. No standoffs are supplied, but you may want to add some to keep the pHAT rock steady on top of the Pi as you press the buttons. Alternatively, you could combine it with Pimoroni’s neat-looking Pibow Zero W case.

Touch Python

Like most Pimoroni add-ons, the Touch pHAT has its own Python library, which is easily installed – along with any missing dependencies – using a single Terminal command. A couple of examples are supplied: a simple button-press demo and a GUI app launcher.

The code syntax is simple enough, using onpress and onrelease events to register the relevant touch actions. It’s then completely up to you as to what these will trigger.

Possible uses for the Touch pHAT include as a control panel for a robot, a remote control for home automation, a drum machine / mini piano, and a simon game.

Most importantly, the buttons are very responsive to touch and will stay triggered/lit until released; you can press as many as you like simultaneously, too. They can even be activated through a thin transparent layer if needed. Note that if you wanted to attach alligator clips to the buttons to attach remote triggers (such as pieces of fruit), you’d have to scrape down to the copper on each button to make the connection work.

Last word

4/5

The Touch pHAT makes it a lot easier to add input buttons to projects, instead of having to wire up push-buttons individually. What you use it for is completely up to you, but the touch-sensitive buttons are really responsive and the light-up effect is a nice bonus.

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.