This adds an ANSI-rendered pinout for the WeAct Studio RP2350B Core board. Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
Pinout diagram
Pinout diagrams can be a helpful tool to display the pin layout for a board.
Rendering them using ANSI and building them into a board's firmware means they are always conveniently available, even over a serial connection.
Overview
pinout.py generates a unicode pinout diagram that uses ANSI escape characters
to add colour. It currently generates the pinout diagram for the WeActStudio
RP2350B board but is an example that could be extended for any board.
Display the output by executing the script:
python pinout.py
Compression
compress.py uses zlib to compress input and output a byte string.
The output from pinout.py can be large but compresses efficiently, so the
intent is that the byte string output from compress.py can then be copied to
../modules/board.py so that the compressed pinout will be included in the
firmware.
To execute:
python pinout.py | python compress.py
Reference
Build your own Command Line with ANSI escape codes provides a good reference of how to use ANSI codes, including helpful colour lookups.
