Test board to test golang periph/periph hardware interface library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Periph-Tester Board

The periph-tester board is a small PCB used to test the https://periph.io/x/periph hardware device interface library.


The board allows simple testing of i2c, spi, 1-wire, pwm, and analog.

  • Gpio can be tested by connecting two pins (preferably interrupt-capable) outside the board.
  • I2C can be tested by exercising an i2c eeprom and the i2c to 1-wire interface chip.
  • SPI can be tested by exercising an spi eeprom.
  • 1-wire can be tested be exercising a 1-wire eeprom and a 1-wire temperature sensor.
  • PWM and ADC can be tested by outputting waveforms with varying duty cycles and reading the level of a low-pass filter.
  • A gpio pin is connected to the write-enable of the I2C and SPI eeproms and can be used to simulate certain errors by write-protecting the eeproms. (In hindsight this creates more pain in ensuring the pin is set correctly than it has true value...)

Standard pin-outs

The recommended pin-outs for various platforms are as follows.

Function Raspberry Pi C.H.I.P. ODROID-C1
i2c bus pins 3&5 TWI1 (bus 1)
pins U13 9&11
i2ca (bus 1)
pins 3&5
spi bus pins 19,21,23,24 bus 32766
pins U14 27-30
bus 0
pins 19,21,23,24
wr-en pin 7 csid0(132)
pin U14-31
pin 7
LED pin 31 csid1(133)
pin U14-32
pin 31
PWM pwm0(34)
pin U13-18
pin 33
ADC N/C lradc
pin U14-11
pin 37
GPIO xio-p6&p7
pins U14-19&20
pins U14-23&24



To enable SPI, see http://www.chip-community.org/index.php/Hardware_Information

  • gpio-write 133 1
  • periph-smoketest -v i2c-testboard -bus 1 -wc 132
  • periph-smoketest -v spi-testboard -wp 132
  • periph-smoketest -v onewire-testboard -i2cbus 1
  • periph-smoketest -v gpio 1019 1020
  • periph-smoketest -v gpio 35 193
  • gpio-write 133 0


  • periph-smoketest -v i2c-testboard -bus 2 -wc 83
  • periph-smoketest -v spi-testboard -wp 83
  • periph-smoketest -v onewire-testboard -i2cbus 1
  • periph-smoketest -v gpio 104 115

Raspberry Pi

  • periph-smoketest -v i2c-testboard -bus 1 -wc 4
  • periph-smoketest -v spi-testboard -wp 4
  • periph-smoketest -v onewire-testboard -i2cbus 1
  • periph-smoketest -v gpio 22 23

PCB and Parts

The PCB can be ordered from OSH park, 3 PCBs cost $3.75 incl shipping. Parts can be ordered from digikey:

  • M24C08 (i2c eeprom): 497-15752-1-ND
  • M95080 (spi eeprom): 497-8683-1-ND
  • DS2483 (i2c 1-wire interface): DS2483R+TCT-ND
  • DS2431 (1-wire eeprom): DS2431+-ND
  • MAX31820 (1-wire temp sensor): MAX31820MCR+-ND
  • TVS diode: CDSOD323-T03SCT-ND
  • LED:
  • 1.8v Zener: MMSZ4678-TPMSCT-ND
  • 4.7uF cap:
  • 100uF cap, 4.7k resistors, 2.2k resistor: all std 0603 parts

Total parts cost: ~$10. If you are contributing to periph and would like an assembled board, contact the author.


Thorsten von Eicken