What is a HAT on Raspberry Pi?

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

On Raspberry Pi, a HAT is basically an add-on board that fits onto the Raspberry Pi GPIO pins. HAT stands for Hardware Attached on Top.

If you look at this picture of the Sense HAT, which is one of the most popular, you can better understand where the name comes from:

The purpose of these HATs is to easily add extra functionality to Raspberry Pi. For example, the Sense HAT has different sensors (thermometer, hygrometer, …), a LED matrix and even a joystick on it. Other hats can add additional ports (e.g. PoE Ethernet or SATA), better components (digital audio) and things like that.

Recommended next step
Master Raspberry Pi in 30 Days

If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.

Check the book here

Some are used as an alternative to more complex electronic circuits because they are plug and play, automatically recognized by Raspberry Pi OS, and sometimes easier to use in programs. For example, using the Sense HAT’s temperature sensor is much easier than creating a small circuit to get it from a traditional sensor.

If you want a better idea of what is possible, you should definitely check out my list of the best Raspberry Pi HATs here.

And for a beginner’s tutorial, I highly recommend getting a Sense HAT and following this two-part guide:

Not getting the same result?

Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.

Ask your question now →
🔒 No risk. Cancel anytime.
  • Get help on your exact issue
  • Access step-by-step videos for tricky setups
  • Browse the website without ads