Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

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

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:

Image of error.
forum image

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

29/11/2015

Posted by:
andrew

andrew Avatar

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.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout