segunda-feira, dezembro 10, 2012

Gertboard software in Python 2.7 – part 2 – ocol and buttons

Download Python Gertboard Programs

ocol – Open Collector – Darlington Array Relay Driver

I’ve managed to get the open collector ocol program written in Python. The ocol program drives the Darlington Array on the Gertboard. This can be used to switch up to 6 relays, each on a separate GPIO port. I’ve managed to write versions for both wiringpi for python ( and RPi.GPIO (

They are both included in the download link, which will always contain the most up to date versions. Here’s a comparison video of Gert’s ocol program running first, then my Python version.


And this weekend I seem to have been on a roll, so I got the buttons program written too. This one is only done with RPi.GPIO because I can’t find how to set the pullups to up using wiringpi for python. – buttons program using RPi.GPIO is also in the zip file to download. This program enables you to test the three buttons, which you can use as inputs to the GPIO. You can see the port status changes on the screen immediately. (You can hook up led indicators too.)

Download Python Gertboard Programs


Sem comentários:


Related Posts Widget for Blogs by LinkWithin