Step 1 - Plug in HAT
Now you have soldered the HAT up and you know how to power the servos, we can install the HAT
Begin by having the Pi shutdown and not powered, plug the HAT on top to match the 2x20 headers, and power up the Pi.
Step 2. Configure your Pi to use I2C devices
To learn more about how to setup I2C with the Raspberry Pi Operating System (OS), please take a minor diversion to this Adafruit Tutorial: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
With I2C enabled per that guide, you can run the following command when the Pi is booted up again in the Terminal and you loaded python3-smbus and i2c-tools:
sudo i2cdetect -y 1
This will search /dev/i2c-1 for all address, and if an Adafruit PWM/Servo HAT is properly connected and it's set to its default address -- meaning none of the 6 address solder jumpers at the top of the board have been soldered shut -- it should show up at 0x40 (binary 1000000) as follows:
Once both of these packages have been installed, and i2cdetect finds the 0x40 I2C address, you have everything you need to get started accessing I2C and SMBus devices in Python.
Page last edited July 29, 2025
Text editor powered by tinymce.