[solved] Getting an Adafruit Servo Hat to Work on an Up Board
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:
- If you are using Ubuntu, you'll need to install the MRAA library. Follow the instructions here: https://github.com/intel-iot-devkit/mraa
- 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.
- 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
- Mine was on bus 5. So find out the address using sudo i2cdetect -r -y 5 (where '5' was determined from step 3.
- 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.
- 300 All Categories
- 104 Announcements & News
- 50 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 52 Unboxing & Project Sharing
- 24 Tech Updates
- 521 UP Products
- UP Xtreme i12
- UP Squared Pro 7000
- UP Element i12 Edge
- 6 UP Squared V2
- 17 UP 4000
- 23 UP Xtreme i11
- 34 UP Squared 6000
- 44 UP Squared Pro
- 139 UP Xtreme
- 813 UP Squared
- 1.4K UP Board
- 88 UP Core Plus
- 221 UP Core
- 3 UP Xtreme Lite
- 43 UP AI Edge
- 215 Starter Kits & Peripheral