Skip to content

Request GPIO support during onboarding. . . #239

@FireNWater

Description

@FireNWater

I just did a fresh image to an NVME drive and all went very smooth. . . I have one request for future onboarding:

  1. Install the "libgpiod" library. This one is the official GPIO library, but there is also the GPIO.Zero python library.
  2. Create a "GPIO" group
  3. Add user astronaut to the GPIO group
  4. Create the following udev rule to allow user astronaut non-sudo access to the GPIO pins on Raspberry Pi's:

/etc/udev/rules.d/99-gpio.rules

# Set permissions for gpiomem and gpiochip devices
KERNEL=="gpiomem", GROUP="gpio", MODE="0660"
KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"

# Set permissions for GPIO pin files when they are created
SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && chmod -R g+w /sys%p'"   

I just did all of this manually, but am thinking it may be nice to add to onboarding.

Thanks!!

There is also the GPIO.zero library for Python if there are other users interested:

# Install pip if not already installed
sudo pacman -S python-pip

# Install GPIO Zero
pip install gpiozero   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions