Rpi Hw

A free C++ library designed to manage the Raspberry Pi's GPIO connector and its other buses.
Alternatives To Rpi Hw
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Rpi Gpio.js547303713 years ago32May 25, 202012mitJavaScript
Control Raspberry Pi GPIO pins with node.js
Mqtt Io395
2 months ago40January 19, 202145mitPython
Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
Unicorn Hat351161a year ago19September 11, 201711mitC
Python library for Unicorn pHAT and HAT. 32 or 64 blinding ws2812 pixels for your Raspberry Pi
Rpi Rf297
73 years ago8December 03, 201824otherPython
Sending and receiving 433MHz signals with cheap GPIO RF modules on a Raspberry Pi
Homebridge Rpi286
10 days ago98November 27, 2022apache-2.0JavaScript
Homebridge plugin for Raspberry Pi.
Awesome Latticefpgas210
5 months ago
:book: List of FPGA Lattice boards using open tools
Mk_arcade_joystick_rpi189
2 months ago49gpl-2.0C
Raspberry PI kernel module for arcade joystick on GPIO and MCP23017
Rpi_gpio1671873 years ago11August 09, 20207mitC
Ruby conversion of RPi.GPIO Python module
Gumcp137
a year ago4mitPHP
Web Control Panel for Raspberry Pi
Rpisoft Uart120
4 months agogpl-2.0C
A Raspberry Pi / BCM2835 Software-based UART Linux device driver
Alternatives To Rpi Hw
Select To Compare


Alternative Project Comparisons
Readme

Rpi-hw v0.7.3

Rpi-hw (short for "Raspberry Pi Hardware") is a free C++ library designed to manage the Raspberry Pi's GPIO connector and its other buses. It allows you to connect several devices to the board (including displays, keypads, stepper motors, and sensors) as you would with Arduino's libraries.

Ultrasonic Distance Sensor . PCD8544 LCD

Features

  • Low-level access to the GPIO Connector and SPI, I2C, UART buses
  • High-level input/output interfaces
  • Support for I/O expander ICs
  • Support for many devices, including displays, keypads, stepper motors, and sensors (see "List of supported devices" section)
  • Unicode support (built-in)
  • Support for standard fonts (using FreeType) (optional)
  • Support for multiple image formats (using Magick++ API) (optional)
  • Drawing functions

List of supported devices

  • 8-bit I/O expander with I2C/SPI (MCP23008, MCP23S08)
  • 16-bit I/O expander with I2C/SPI (MCP23017, MCP23S17)
  • Character LCDs (Hitachi HD44780)
  • Graphical LCDs (Philips PCD8544)
  • Single and multiple 7-segments diplays
  • Matrix keypads
  • Ultrasonic distance sensor (HC-SR04)
  • Stepper motors

To-do list

  • Support for UART interface

Code examples

Accessing to the GPIO connector:

// Get the GPIO controller
gpio &io = gpio::get();

// Set the mode of GPIO #11
io.setup( 25, OUTPUT );

// Write on GPIO #11
io.write( 25, HIGH );

Reading from 16-keys keypad:

// Define the keymap
std::vector< uint8_t > keymap = {

	'1', '2', '3', 'A',
	'4', '5', '6', 'B',
	'7', '8', '9', 'C',
	'*', '0', '#', 'D'
};

// Matrix keypad controller
keypad::matrix dev( { 14, 15, 18, 23 }, { 24, 25, 8, 7 }, keymap );

// Main loop
for ( ;; ) {

    // Check the button state
    if ( dev.keyPressed('2') || dev.keyPressed('3') )
        std::cout << "You have pressed keys '2' or '3'!\n";

	// Wait some time
	time::msleep( 100 );
}

Writing texts on a Hitachi HD44780-based LCD:

// Display controller
display::hd44780 dev( 14, 18, 4, 17, 21, 22 );

// Initialize the 16x2 display
dev.init( 16, 2 );

// Move the cursor position
dev.move( 2, 0 );

// Write a string at cursor position
dev.write( "Hello World!" );

Documentation

Detailed documentation of Rpi-hw's features and usage can be found on the official wiki.

Also you can find some articles about the library on http://hackyourmind.org/.

License

The library is released under terms of the GNU LGPL v3.

Rpi-hw is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation version 3 of the License.

Rpi-hw is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

See COPYING file for more details.

Bug tracker

Have a bug? Please create an issue on GitHub at https://github.com/Wicker25/Rpi-hw/issues.

Popular Gpio Projects
Popular Rpi Projects
Popular Hardware Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
Gpio
Rpi
Stepper