HsMouse
Experimental control software for robotics, tested on Raspberry Pi 5.
System Configuration:
To configure the system, the files in the sysconf
directory must be
installed:
- Copy the UDEV
*.rule
files into/etc/udev/rules.d
- Copy
config.txt
to/boot
- Reboot the Raspberry Pi for the changes to take effect
Low Power Consumption When Powered Off:
By default, the Raspberry Pi 5 keeps the SoC powered on (in a shutdown state) even after the system is shut down. As a result, it continues to consume 1.2-1.6W of power, even with nothing plugged in except for power. For more details, see: Reducing Raspberry Pi 5's Power Consumption
This can be easily fixed by editing the EEPROM configuration with the following command:
user@alarm$ sudo rpi-eeprom-config -e
Ensure that POWER_OFF_ON_HALT=1
is set, while leaving the other variables
unchanged:
[all]
BOOT_UART=[...]
POWER_OFF_ON_HALT=1
BOOT_ORDER=[...]
To run rpi-eeprom-config
on Arch Linux, you’ll need to install the
rpi5-eeprom
package from the PKGBUILDs
repository. Run the following
commands to do so:
user@alarm$ git clone https://github.com/archlinuxarm/PKGBUILDs
user@alarm$ cd PKGBUILDs/alarm/rpi-eeprom
user@alarm$ makepkg -s
user@alarm$ sudo pacman -U rpi5-eeprom-*.pkg.tar.xz
GPIO and PWM Access Without Root:
To enable GPIO and PWM access without root privileges on the Raspberry Pi 5, follow these steps:
- Create two new user groups:
gpiod
andpwm
- Add your user to both groups
- The UDEV rules installed previously will grant the
gpiod
andpwm
user groups permission to access the respective subsystems.
This configuration ensures that GPIO and PWM operations can be performed without needing root access.
Build Instructions:
- Install
stack
. It’s recommended to useghcup
for installation. - Run
stack build
to compile the libraries and executables
Note: You may need to install system dependencies on your host first (e.g.,
libgpiod
, etc.)