Adafruit DC and Stepper Motor HAT
I'm trying to use the Up Board with the Adafruit DC and Stepper Motor HAT. I've installed Ubuntu and updated the Kernel as described here: https://wiki.up-community.org/Ubuntu and also installed: sudo apt install upboard-extras, and gave my user (up) i2c permissions using sudo usermod -a -G i2c up
I then tried to follow install the HAT software using the instructions I found here: https://wiki.up-community.org/Adafruit#Using_Adafruit_DC_.26_Stepper_Motor_HAT_on_UP However it appears that the repository https://github.com/emutex/Adafruit-Motor-HAT-Python-Library.git doesn't exist anymore.
But after some digging I found this repository https://github.com/emutex/Adafruit_Python_GPIO which states: "This version of adafruit python gpio add support for all the mraa library to use adafruit shields. The only thing needed is to double check the i2c/spi bus number for the given board. First install this library from this repository with: sudo python setup.py install then install the others adafruit libraries, they should work out of the box.
So first I installed https://github.com/intel-iot-devkit/mraa using
sudo add-apt-repository ppa:mraa/mraa
sudo apt-get update
sudo apt-get install libmraa2 libmraa-dev libmraa-java python-mraa python3-mraa node-mraa mraa-tools
Then I installed: https://github.com/emutex/Adafruit_Python_GPIO but I was not sure how to double check the i2c/spi bus number. Finally, I installed the Adafruit software using https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi/installing-software
When I run the examples/DCTest.py I get the error message: IOError: [Errno 6] No such device or address (see full error below.) Presumably I need to do something related to the default I2C bus. Any suggestions on how to proceed?
Traceback (most recent call last):
File "DCTest.py", line 8, in
mh = Adafruit_MotorHAT(addr=0x60)
File "build/bdist.linux-x86_64/egg/Adafruit_MotorHAT/Adafruit_MotorHAT_Motors.py", line 231, in init
File "build/bdist.linux-x86_64/egg/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py", line 59, in init
File "build/bdist.linux-x86_64/egg/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py", line 95, in setAllPWM
File "build/bdist.linux-x86_64/egg/Adafruit_GPIO/I2C.py", line 118, in write8
File "build/bdist.linux-x86_64/egg/Adafruit_PureIO/smbus.py", line 256, in write_byte_data
IOError: [Errno 6] No such device or address