Problems with the library
The Servo PWM Pi is a 16-channel, 12-bit PWM controller for driving LEDs and RC servos on the Raspberry Pi
29/11/2015
Posted by:
Jimbobob
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:
Image of error.
If anyone could help that'd be great! Thanks so much!
29/11/2015
Posted by:
andrew
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.
29/11/2015
Posted by:
Jimbobob
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.