The raspberry pi connects to add on extension boards via its 40 pin gpio header interface these add on boards are called hats hardware attached on top i assume its name also is derived from the fact that the pi wears the board much like a hat.

In this simple tutorial we will be showing you how to wire up your rotary encoder and how to use some python code to interact with it lets start with a brief explanation of what a rotary encoder is and how they work a rotary encoder is a device that senses the rotation and direction of the attached knob it works by having 2 internal contacts that make and break a hellip.

The raspberry pi has a number of ports which you will use to control the raspberry pi and it can use to control other devices your raspberry pi will have the following ports usb ndash usb ports are used to connect a wide variety of components most commonly a mouse and keyboard hdmi ndash the hdmi port outputs video and audio to your monitor.