[solved] Getting an Adafruit Servo Hat to Work on an Up Board

Options
lowjunen
lowjunen New Member Posts: 5
edited March 2019 in UP Board Linux

Hellooo everyone,

Just thought I'd chip for anyone having issues with getting the the adafruit hats to work with the GPIO pins. A few things that are missing/aren't clear from the wiki:

  1. If you are using Ubuntu, you'll need to install the MRAA library. Follow the instructions here: https://github.com/intel-iot-devkit/mraa
  2. The servo hat requires an i2c input, which by default is not enabled in the BIOS. Head over to the Hat tab in the bios and enable it at the I2CO/GPIO Selection.
  3. The simpletest python code's default search address for i2c is incorrect. First, find out which bus your i2c is at using: ls /sys/devices/pci0000:00/808622C1:01/ | grep i2c
  4. Mine was on bus 5. So find out the address using sudo i2cdetect -r -y 5 (where '5' was determined from step 3.
  5. In the simpeltest.py example, add the address to the initialization. In my case it was pwm = Adafruit_PCA9685.PCA9685(address=0x40, busnum=5).

Each of these steps aren't really new, it's just that they're scattered around in the forum. Hope it helps for anyone who's been having issues with their hats! Would be really good if these could be added to the wiki instructions. Otherwise they're really clear and useful.

Tagged:

Comments

Tagged