Raspberry Pi

Note: When downloading files, click the circled icon at the top of the new page to retrieve the file.

Libraries

    • LcdLib.zip: C++ library to interface to a 128x64 LCD display (see Graphical Display for examples) The library uses pigpio to get access to timing and GPIOs.
    • SocketLib.zip: Small library to communicate via sockets to a server. Based on code examples found on the web.

Projects

Web Controlled Music Player

Pi Code: WebMusicPlayer.zip

Schematic: Not yet but the web sites listed in the instructions show how to add the parts to get audio output. It is also possible to just add a USB to audio out CODEC so that no soldering is needed.

Device: Raspberry Pi Zero W

3D printed case parts: WebMusicPlayerBox.zip (STL files for 3D printing along with Fusion 360 design files)

This project turns a Raspberry Pi W into a stand-alone MP3 player controlled via a web page. The instructions in the Pi Code zip file explain how to add audio out on a Pi Zero using a few capacitors and resistors. A USB CODEC can be used instead of the resistors and caps to get audio output. The instructions also explain how to set up and copy files to the Pi Zero to implement the music player.

The VLC music player (comes standard with the Rasbian install) is used to play music and is controlled using the socket interface.

Music Player

Pi Code: MusicPlayer.zip (2-10-2019) also uses LcdLib and SocketLib found in the library section.

PIC Code: PiPowerControl.X.zip (Microchip MPLAB X IDE project)

Schematic: PiMusicPlayer.pdf

Device: 128x64 LCD display (AMG12864C/Crystalfontz DP-3335) using two S6B0108 controllers and a rotary encoder. Also a PIC 18F1330 and relay are used to control the power to the Pi.

3D printed case parts: MusicPlayerCase.zip (STL files for 3D printing along with Fusion 360 design files)

Instructions for use: MusicPlayerInstruct.pdf

This project turns a Raspberry Pi into a stand-alone MP3 player. I used a junk-box Pi version 1 and it works pretty well. The instructions on how to set up the Pi are in the file MusicPlayerSetup.txt included in the zip file. Music files can reside on the SD card and/or a USB drive inserted into a USB slot. The user interface is controlled with a single rotary encoder.

The VLC music player (comes standard with the Rasbian install) is used to play music and is controlled using the socket interface.

LCD Display

Code: LcdPlusExamples.zip

Schematic: Just the wires described in the library function.

Device: 128x64 LCD display (AMG12864C/Crystalfontz DP-3335) using two S6B0108 controllers

This project uses an old version 1 of the Raspberry Pi but should work on a Pi Rev 3B since the same GPIO functions work on that board.

Rotary Encoder

Code: RotaryEncoder.zip (2-7-2019) also uses LcdLib.

Schematic: Connections described in the code

Device: LCD display above plus a rotary encoder

This project interfaces a rotary encoder to the Pi and displays the value on a 128x64 LCD screen. The encoder is tracked in an interrupt service routine.