This repo contains a Raspberry PI controller menu that allows interaction with the RPi via a mini LCD display and 5 tactile buttons connected via GPIO. This is helpful in situations where you want to use your RPi headless, without screen, keybaord and mouse (such a process control or process automation scenarios) but want to interact and control your PI locally (ssh is not always convenient).
This is very similar to functionality to your have on PLCs that allow local interaction, program execution and status from a built-in mini display.
To see it in action, click on the image below for a brief YouTube video.
- 1x RPi 3 or 4
- 1x Waveshare 1.8in 128x160 LCD Display - https://www.amazon.com/gp/product/B0785SRXDG/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1
- 5x Micro Tactile Buttons - https://www.amazon.com/gp/product/B07HBBGRGM/ref=ppx_yo_dt_b_asin_title_o08_s01?ie=UTF8&psc=1
Buttons share a common connection via a 1K resistor to 3.3V. The other side of the buttons are connected to GPIO pins (BCM Numbering) as follows:
Up Button -> GPIO BCM 17
Down Button -> GPIO BCM 5
Left Button -> GPIO BCM 6
Right Button -> GPIO BCM 22
Select Button -> GPIO BCM 18
Schematic to be published.
- Python 3.7 or higher
- RPI.GPIO
- PIL/Pillow
- py-yaml
- Spidev
The menu is installed as a service at boot time. It has the ability for user defined root and sub menus as well as process execution or arbitary commands (as long as you can run them from a shell). Configurably, commands can reqiure confirmation and report back on execution status.
There are currently two built-in commands:
- sysInfo - this command provides a systems overview, including: IP address, average load, memory utilization, disk utilization and temperature
- network - this command provides information about the RPi's network capability, including available interfaces and MAC addresses.
The project has an included sample menu (controllerMenu.yaml) to illustrate the configuration. The menu has the following structure
Root # Root Menu
|-- Demo Routines # Demo sub menu
| |-- Robot Arm Test # Invokes test routine for robot arm
| |-- Pump Test # Invokes test routine for pump
|-- System Information # Invokes sysInfo built-in command
|-- Admin # Admin sub menu
|-- Reboot # Reboots the RPi
|-- Shutdown # Shutsdown the RPi
|-- Network # Invokes the network built-in command
- Install dependencies (above)
- Clone this repo to your RPi
- Edit controllerMenu.yaml to your specifications
- Make entry point executable
chmod 755 __main__.py
- Create symbolic link to service definition
sudo ln -s <path to controllerMenu.service> /etc/systemd/system/controllerMenu.service
- Configure menu for start on boot
sudo systemctl enable controllerMenu.service
- Start menu manually
sudo systemctl start controllerMenu.service
To be added once I post the 3D models on Thingiverse
- meArm REST API - https://app.swaggerhub.com/apis-docs/thor-schueler/Avanade.meArm.API.REST/1.0.0
- meArm REST API and Azure IoT Hub implementation - https://github.com/Avanade/meArmPi
- To create a meArm (3D Print) - https://www.thingiverse.com/thing:1550041