🐰 chee cherries quiet party

entries from december 2020

Greenwich Mean Time GMT

Snootclub MatΓ©

an overnight recipe

Ingredients

  • handful brown sugar
  • handful white sugar
  • 1 lemon, sliced
  • ~120g yerba mate
  • ~litre still water
  • ~litre sparkling water

Directions

  1. squeeze the lemon slices into the bottom of a litre jar with a tight lid, i’ve used a kilner
  2. add the handfuls of sugar, and stir until dissolved
  3. drop the lemon slices and yerba matΓ© in
  4. fill the jar with the still water, (you might need to put the lid on and shake it to soak the tea, so you can fill it to the top)
  5. put it in the fridge for 8-12 hours or overnight
  6. strain the liquid through a cheesecloth (or a sieve will do, the pieces are quite big) and mix 50/50 with sparkling water
  7. serve in large glasses with ice

β€” chee (hi@chee.party)

Greenwich Mean Time GMT

using /dev/gpiomem on archlinux arm

imagine you have a raspberry pi running arch linux arm, and you want to use the python library RPi.GPIO.

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.

Add a gpio user

as root, create a gpio user

groupadd gpio
usermod -aG gpio alarm # alarm is the name of the default archlinuxarm user

setup udev

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

reboot, run the python, no root,