looking at the code for my old lisp implementation of chicken egg hole, vs the 32blit-sdk c++ version. the lisp version is so much nicer. maybe i can make them more similar by using structs and functions instead of classes in the c++ version.
did that thing today where i blow away my whole linux partition and start again
it’s some kind of extreme sport; recreational crisis zone
i tried qubesos, it was unusable on my laptop. now i’ve installed manjaro. manjaro is remarkably good. btrfs, encrypted boot. it was almost effortless to get to a system that would normally take me an hour or two on vanilla arch.
i’d like some vanilla ice cream, but they would saw my feet off.
that requires a
/dev/gpiomem device, which is a hacky
/dev/mem derivative that allows you to access the gpio pins without being root. which is important if you want to also be able to access a normal user’s dbus session, or anything else where you’d like to not be root while running the python.
arch linux arm uses raspberrypi’s kernel fork, but doesn’t set up the
gpiomem device the way it’s needed for RPi.GPIO to work.
as root, create a gpio user
groupadd gpio usermod -aG gpio alarm # alarm is the name of the default archlinuxarm user
Make a file called
/etc/udev/rules.d/pins.rules and put this in it:
SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660" SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
you may also wish to append this line, if you’re going to need spi access too:
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
reboot, run the python, no root,