You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Board test suite for CircuitPython. Run these tests to ensure that a CircuitPython port was created correctly, individual pin mappings are correct, and buses (e.g. SPI) work.
6
+
7
+
Tests can be run individually. Copy code found in each *<name>_test.py* module (found in *source* directory) to main.py in your CIRCUITPYTHON device drive.
8
+
9
+
Alternatively, tests can be imported as modules. Copy the *lib* directory to CIRCUITPYTHON device drive and import the test in your own code. Each test can be run with the `run_test(pins)` function.
10
+
11
+
The *main.py* example shows how to call tests from within a script. *main.py* runs the following tests:
Please ensure all dependencies are available on the CircuitPython filesystem.
30
+
This is easily achieved by downloading
31
+
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
32
+
33
+
Usage Example
34
+
=============
35
+
36
+
You will need the following components:
37
+
38
+
* Multimeter
39
+
* LED
40
+
* 1x 330 Ohm resistor
41
+
* 2x 4.7k Ohm resistor
42
+
* Microchip 25AA040A SPI EEPROM
43
+
* Microchip AT24HC04B I2C EEPROM
44
+
* Breadboard
45
+
* Wires
46
+
47
+
Connect the components as shown to your board.
48
+
49
+
.. image:: docs/test_jig.png
50
+
:alt:Test jig Fritzing diagram
51
+
52
+
Copy the *lib* folder to the CIRCUITPYTHON drive. Copy *main.py* to the root directory of your CIRCUITPYTHON drive. Open a Serial terminal and connect to the board. Follow the directions given to run through the tests.
53
+
54
+
Building
55
+
========
56
+
57
+
Individual test modules can be built with the mpy-cross cross-compiler. This is required to save RAM space if you plan to run more than one test at a time. See `the mpy-cross directory in circuitpython <https://github.com/adafruit/circuitpython/tree/master/mpy-cross>`_ to learn more.
0 commit comments