Problems with the library
3066 Views - Created 29/11/2015
So i'm using the servo pi and the coresponding library to go with it and i'm running into some problems, I'm getting some odd errors: https://i.imgur.com/rCUHlFr.png
If anyone could help that'd be great! Thanks so much!
It looks like your script is missing the ABEHelpers class which the ABE_ServoPi class uses to access the i2c bus. If you look at our demo-pwm.py demo on GitHub you can see the steps that are needed to use the library. you need to import the ABE_ServoPi and ABEHelpers libraries and then create an instance of ABEHelpers() called i2c_helper and use that to create an instance of the i2c bus with bus = i2c_helper.get_smbus()
Once you have an instance of the i2c bus you can then use this to create an instance of the pwm class with pwm = PWM(bus, 0x40)
If you copy the first 25 lines from the demo and use that to replace the first two lines of your code then hopefully everything should work.
You may also have to copy the ABE_ServoPi.py and ABE_helpers.py files into the same folder as your code.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.