Skip to content

Terkwood/hello-pi

Repository files navigation

Hello Raspberry Pi

Examples which demonstrate the use of Raspberry Pi and GPIO.

Of interest are those written in rust. Among these, the MIDI Light Show example is the most mature.

Breadboard Diagrams

We used the following configuration for the button example:

button configuration

There are Fritzing diagrams available for these examples in the doc folder.

You can download Fritzing here.

Learnings

Push buttons

Basic push buttons have legs which are bent by default. This is helpful for soldering the buttons onto actual build, but makes it difficult to get the button pushed into the breadboard.

We used a pair of pliers to straighten out the pins on the button, and made sure that we pushed the button all the way down into the bread board. This allowed us to establish connectivity with the button after an initial period of failure.

Before straightening out button legs

Camera install

Linux GPIO docs

Linux GPIO subsystem documentation can be found at

Helper scripts

We included some helper scripts, available in the helpers directory, which you can use to unexport pins which are still held in user space after killing your app, or to test setting the output value for a set of pins.

These scripts use the legacy GPIO interface found in /sys/class/gpio, so if you're making an effort to understand the C API for GPIO, please make sure that you refer to the updated documentation.

Thank You - Blink Freely

blink freely