adafruit_boardtest.boardtest_gpio

Toggles all available GPIO on a board. Verify their operation with an LED, multimeter, another microcontroller, etc.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Software and Dependencies:

adafruit_boardtest.boardtest_gpio.run_test(pins)

Toggles all available GPIO on and off repeatedly.

Parameters:pins (list[str]) – list of pins to run the test on
Returns:tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_i2c

Performs random writes and reads to I2C EEPROM.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Hardware:

Software and Dependencies:

adafruit_boardtest.boardtest_i2c.run_test(pins, sda_pin='SDA', scl_pin='SCL')

Performs random writes and reads to I2C EEPROM.

Parameters:
  • pins (list[str]) – list of pins to run the test on
  • sda_pin (str) – pin name of I2C SDA
  • scl_pin (str) – pin name of I2C SCL
Returns:

tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_led

Toggles all available onboard LEDs. You will need to manually verify their operation by watching them.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Software and Dependencies:

adafruit_boardtest.boardtest_led.run_test(pins)

Toggles the onboard LED(s) on and off.

Parameters:pins (list[str]) – list of pins to run the test on
Returns:tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_sd

Performs random writes and reads to SD card over SPI.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Hardware:

Software and Dependencies:

adafruit_boardtest.boardtest_sd.run_test(pins, mosi_pin='SD_MOSI', miso_pin='SD_MISO', sck_pin='SD_SCK', cs_pin='SD_CS')

Performs random writes and reads to file on attached SD card.

Parameters:
  • pins (list[str]) – list of pins to run the test on
  • mosi_pin (str) – pin name of SPI MOSI
  • miso_pin (str) – pin name of SPI MISO
  • sck_pin (str) – pin name of SPI SCK
  • cs_pin (str) – pin name of SPI CS
  • filename (str) – name of file to use as test on SD card
Returns:

tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_sd_cd

Reports the output of an SD card’s chip detect (CD) pin.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Hardware:

Software and Dependencies:

adafruit_boardtest.boardtest_sd_cd.run_test(pins, cd_pin='SD_CD')

Checks status of CD pin as user inserts and removes SD card.

Parameters:
  • pins (list[str]) – list of pins to run the test on
  • cd_pin (str) – pin name of chip detect (CD) line
Returns:

tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_spi

Performs random writes and reads to SPI EEPROM.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Hardware:

Software and Dependencies:

adafruit_boardtest.boardtest_spi.run_test(pins, mosi_pin='MOSI', miso_pin='MISO', sck_pin='SCK', cs_pin='D2')

Performs random writes and reads to file on attached SD card.

Parameters:
  • pins (list[str]) – list of pins to run the test on
  • mosi_pin (str) – pin name of SPI MOSI
  • miso_pin (str) – pin name of SPI MISO
  • sck_pin (str) – pin name of SPI SCK
  • cs_pin (str) – pin name of SPI CS
Returns:

tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_uart

Performs random writes and reads across UART. Connect a wire from TX pin to RX pin.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Software and Dependencies:

adafruit_boardtest.boardtest_uart.run_test(pins, tx_pin='TX', rx_pin='RX', baud_rate=9600)

Performs random writes out of TX pin and reads on RX.

Parameters:
  • pins (list[str]) – list of pins to run the test on
  • tx_pin (str) – pin name of UART TX
  • rx_pin (str) – pin name of UART RX
Returns:

tuple(str, list[str]): test result followed by list of pins tested

adafruit_boardtest.boardtest_voltage_monitor

Prints out the measured voltage on any onboard voltage/battery monitor pins. Note that some boards have an onboard voltage divider to decrease the voltage to these pins.

Run this script as its own main.py to individually run the test, or compile with mpy-cross and call from separate test script.

  • Author(s): Shawn Hymel for Adafruit Industries

Implementation Notes

Hardware:

Software and Dependencies:

adafruit_boardtest.boardtest_voltage_monitor.run_test(pins)

Prints out voltage on the battery monitor or voltage monitor pin.

Parameters:pins (list[str]) – list of pins to run the test on
Returns:tuple(str, list[str]): test result followed by list of pins tested