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: Sequence[str]) Tuple[str, List[str]]

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: Sequence[str], sda_pin: str = 'SDA', scl_pin: str = 'SCL') Tuple[str, List[str]]

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: Sequence[str]) Tuple[str, List[str]]

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: Sequence[str], mosi_pin: str = 'SD_MOSI', miso_pin: str = 'SD_MISO', sck_pin: str = 'SD_SCK', cs_pin: str = 'SD_CS', filename: str = 'test.txt') Tuple[str, List[str]]

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: Sequence[str], cd_pin: str = 'SD_CD') Tuple[str, List[str]]

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: Sequence[str], mosi_pin: str = 'MOSI', miso_pin: str = 'MISO', sck_pin: str = 'SCK', cs_pin: str = 'D2') Tuple[str, List[str]]

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: Sequence[str], tx_pin: str = 'TX', rx_pin: str = 'RX', baud_rate: int = 9600) Tuple[str, List[str]]

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

  • baudrate (int) – the baudrate to use

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: Sequence[str]) Tuple[str, List[str]]

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