Raspberry Pi Development Notes
Article Created on May 10, 2023
This article contains references that I used while developing on Raspberry Pi 3 and 4.
Documentation relevant to Raspberry Pi
- Raspberry Pi Pinout
- Sparkfun: Raspberry Pi GPIO Pinout
- Raspberri Pi Documentation: GPIO
- Website: Raspberry Pi Documentation
Creating SystemD Services
The objective is to start a python script during boot time. In the following example, the name of the python script is service_file.py
.
Create a new file with .service
extension in /lib/systemd/system/
directory.
Enter the following text in the file:
[Unit]
Description=My New Service
After=multi-user.target
[Service]
ExecStart=/usr/bin/python3 /home/pi/service_file.py
[Install]
WantedBy=multi-user.target
Reference
Boot-Time Optimization
Following are some of the useful articles that I went through to reduce the boot-time of Raspberry Pi.
- Single Board Bytes: How to fast boot Raspberry Pi
- Raspians: How to fast boot Raspberry Pi
- Himesh’s Blog: Fast boot with Raspberry Pi
- Furkan Tokac - Raspberry Pi 3 Fastboot - Less Than 2 Seconds
- Instant Pi OS
- Embedded Linux boot time optimization training
Bluetooth Low Energy with BlueZ
Following are the articles that were useful to me while writing an application for Raspberry Pi 4 to communicate to a smartphone using BLE. I used DBUS with Python bindings to communicate to BlueZ via DBUS. I used nRF Connect app in Android phone to test the application.
- Bluetooth Low Energy (BTLE) Peripherals with Raspberry Pi
- Using BLE Devices with a Raspberry Pi
- Bluez Documentation
- dbus-python tutorial
- nRF Connect for Mobile
Location Update using Mapbox
Creating HTML user interfaces
The following are the articles on creating user interface using HTML-CSS and communicating with the user interface using Python and Javascript. The framework used is Eel which uses WebSockets.