wiringGPIOExtensions
wiringGpioExtensions is a library that extends the functionality of the popular wiringPi library for controlling GPIO pins in C and C++ programs.
If you are new to programming Raspberry Pi GPIO in C or C++, you should start with the wiringPi library by Gordon Henderson:
Once you are familiar with the wiringPi interface, it should be easy to utilize the wiringGpioExtensions library for additional features. You can call the basic wiringPi functions and the extended functions through the wiringGpioExtensions API, so you only need to link to a single library.
In addition to the wiringPi function calls, the WiringPiExtension includes simple interfaces to control:
- Stepper Motors
- Seven Segment Displays
- Rotary Encoders
- PCA9685 port extender (thanks to Reinhard Sprung’s code)
The WiringPiExtension library code is available here:
There is a sample project with a console application showing how to use the library for basic pin control, driving stepper motors, seven segment LED displays, and devices using the PCS9685 chip such as the motor hat or servo hat from Adafruit.
There is a C# wrapper assembly that allows you to easily use the wiringGpioExtensions with a .NET application. You can use Visual Studio on the PC and/or MonoDevelop on the Raspberry Pi to quickly develop a C# console application, or even a Windows Forms GUI application to control GPIO pins.
For an example of the WiringPiExtension with the C# wrapper in action, check out these projects:
- GPIO Joy – use your XBox joystick to control GPIO pins by editing some simple XML.
- FrakenNXT Robot Controller – software to control a Raspberry Pi powered robot over WiFi.