Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Problems with the library

3066 Views - Created 29/11/2015

29/11/2015

Posted by:
Jimbobob

Jimbobob Avatar

Hey guys!
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
forum image

If anyone could help that'd be great! Thanks so much!

29/11/2015

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hi

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

Jimbobob Avatar

Thank you so much, I will try this tomorrow. I apologise for sending this and also a support ticket, I posted this and then thought a support ticket may be better thank you any way, I'm kinda new to python!

Sign in to post your reply

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.