Before you begin you'll need to have a fully set up Raspberry Pi computer with internet connectivity.

You can use any Raspberry Pi single board computer (SBC) with a 2x20 GPIO connector.

Install Adafruit-Blinka

We have a full guide on installing Adafruit-Blink here:

Follow that guide first for the initial setup. That should install the necessary Blinka software as well configure the Raspberry Pi hardware, like enabling I2C etc.

Once Blinka is installed and checks out OK, proceed to the next section.

Power off & Install HAT

Shutdown the Pi safely with sudo shutdown -h now and install the HAT as shown. There's an extra long header standoff that goes between the Pi headers and the HAT. Make sure they are lined up correctly - Plugging in the HAT wrong can damage your Pi permanently!

Start the pi up again and open a terminal window if you boot to graphics mode.

On the command line, install I2C tools so you get the detect program with sudo apt-get install -y i2c-tools

Now scan for I2C to see that the Crickit is found with i2cdetect -y 1

If you get an error Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory - Enable I2C following this guide. Don't forget to reboot afterwards.

Note that you should be able to see the i2c address 0x49 appear. Make sure that the power switch on the HAT is on and power is plugged into the DC jack.

If the i2c address doesn't appear, try clicking the reset button on the HAT once, to reset it, and try again.

Install Crickit library

We will use our Crickit library to make easy work of motors and sensor readings, install it with

pip3 install adafruit-circuitpython-crickit

You can test that your software installed properly by running Python 3 and entering these commands

from adafruit_crickit import crickit
print(crickit.touch_1.value)
print(crickit.touch_1.value)

Between the second and third command, touch your finger to the first Capacitive Touch pad on the HAT.

 

If the value changes like in the screen shot below, it's working!

This guide was first published on Dec 14, 2018. It was last updated on Jul 22, 2024.

This page (Python Installation) was last updated on May 19, 2024.

Text editor powered by tinymce.