Aug 012013
 
Using the MCP23017 port expander with WiringPi2 to give you 16 new GPIO ports - part 3

In this article, I’ll show you how to hook up and control a port expander chip with wiringpi2 for python. It’s really easy, and once set up (with about 3 lines of code) you can control your new ports just the same way as if they were on the Pi itself. This is, so far, my favourite new feature of WiringPi2 for Python – although there are some I have yet to play with. This is part 3 of my wiringpi2 for python series. If you haven’t read parts 1 & 2 yet, I recommend […more…]

Jul 262013
 
How to use WiringPi2 for Python with pull-ups or pull-downs and PWM - pt 2

This is part 2 in a series on WiringPi 2 for Python. The basics are covered in part 1 (click here). You should read that first if you haven’t already, as we build on it here in part 2. Today we’ll cover three things… 1. Raspberry Pi board revision checking with WiringPi2 for Python 2. Using the Raspberry Pi’s internal pull-ups and pull-downs with WiringPi2 for Python 3. Using hardware PWM with WiringPi2 for Python 1. Checking your Raspberry Pi board revision number in WiringPi2 It’s quite useful to be able to check what version […more…]

Jul 232013
 
How to use WiringPi2 for Python on the Raspberry Pi in Raspbian part 1

Basic Input/Output with WiringPi 2 What is WiringPi2 and why do I need it? WiringPi2 for Python is an excellent GPIO handling system written by Gordon ‘Drogon’ Henderson and packaged for Python by Phil ‘Gadgetoid’ Howard. It uses Arduino-like scripting language. For simple GPIO work, I still tend to use RPi.GPIO because that’s what I first got started with, but WiringPi is a very good alternative. It currently has more features. One of the reasons (I think) the take-up for WiringPi-Python has been a bit slow, despite its richer feature set, is the lack of […more…]

Apr 072013
 
RPi.GPIO 0.5.2a now has software PWM - How to use it

Over the last couple of weeks the pace of development for Python programmers who like to dabble in GPIO has gone up a gear. Both main GPIO systems for Python on the Raspberry Pi have been getting some enhancements. RPi.GPIO, now at version 0.5.2a, has interrupts and threaded callback capability. You will probably have seen my three recent posts showing how to use those. WiringPi for Python version 2 is in Beta testing. I discovered two bugs while I was trying it out. Both of those have been squashed. One by Gordon “Drogon” Henderson in […more…]