Tcl Raspberry Pi I/O

Prerequisites
Login

Prerequisites

The pi user is member of all the required groups by default. To check group membership, the id command can be used.

The piio command

To be able to use the piio command, the user must be a member of the gpio group.

The twowire command

For the twowire command, the user must be a member of the i2c group and i2c functionality must be enabled on the Raspberry Pi:

  1. Run sudo raspi-config.
  2. Navigate to "Interface Options" and press Enter
  3. Navigate to "I2C" and press Enter
  4. Select "<Yes>" when asked to enable I2C
  5. Select "<Ok>"
  6. Select "<Finish>"

The spi command

For the spi command, the user must be a member of the spi group and spi functionality must be enabled on the Raspberry Pi:

  1. Run sudo raspi-config.
  2. Navigate to "Interface Options" and press Enter
  3. Navigate to "SPI" and press Enter
  4. Select "<Yes>" when asked to enable SPI
  5. Select "<Ok>"
  6. Select "<Finish>"