Yep, you read that correctly: Python modules for controlling the Servo, Relay, and OLED Expansions are now available. They’re based on the C libraries so the control interface is very similar between C and Python.

How to Install the Modules

Make sure your Omega is running the latest firmware, b244, and then run the following commands:

opkg update
opkg install python-light pyPwmExp pyRelayExp pyOledExp

The modules are completely independent of each other, so you do not need all three!

How to use the Modules

Check out the wiki articles on the Onion libraries, they now include info on the Python Modules as well.

Please let us know if you have any suggestions for the wiki articles on how they can be improved!

Other Stuff

Right now the modules have only been tested with Python 2.7, if there is enough interest, we will make sure Python3 is 100% supported as well.

And right now, the libraries are not object-oriented, just a collection of functions like the C libraries. If there is enough interest, we will make object oriented libraries as well!

Happy hacking and happy holidays!

Join the discussion here: https://community.onion.io/topic/282/python-modules-for-the-servo-relay-and-oled-expansions

HACKED BY SudoX — HACK A NICE DAY.