No description
Find a file
Liz 68b5979e26 ch552 & ch32
adding pin csvs for ch552 and ch32. updates to parser.py for ch32
2024-08-16 09:55:50 -04:00
.gitignore Update components, gitignore 2023-02-17 13:13:09 -05:00
atmega32u4pins.csv separate arduino adc name from pin adc name 2022-04-11 12:40:15 -04:00
atmega328pins.csv add atmega328 support 2021-10-12 14:27:48 -04:00
attiny8xpins.csv pinz 2021-10-16 17:51:42 -04:00
breadboard.svg noodles 2021-05-02 11:48:15 -04:00
ch32v203pins.csv ch552 & ch32 2024-08-16 09:55:50 -04:00
ch552pins.csv ch552 & ch32 2024-08-16 09:55:50 -04:00
esp32c3pins.csv add esp32c3 2022-01-10 00:46:53 -05:00
esp32pins.csv run on esp32 feather 2022-01-15 12:47:23 -05:00
esp32s2pins.csv Remove initial commas from CSVs, change chroma table, fix some SAMD things 2021-05-17 13:53:47 -07:00
esp32s3pins.csv add two missing pins on some modules 2023-08-18 19:10:27 -04:00
imxRT10xxpins.csv simplifying columns 2023-03-21 15:21:17 -04:00
nrf52840pins.csv Remove initial commas from CSVs, change chroma table, fix some SAMD things 2021-05-17 13:53:47 -07:00
output.svg add esp32c3 2022-01-10 00:46:53 -05:00
parser.py ch552 & ch32 2024-08-16 09:55:50 -04:00
pinlabels.svg add esp32c3 2022-01-10 00:46:53 -05:00
pinouts_components.svg Update components, gitignore 2023-02-17 13:13:09 -05:00
README.md add samd51 2022-04-25 16:40:10 -04:00
rp2040pins.csv Remove initial commas from CSVs, change chroma table, fix some SAMD things 2021-05-17 13:53:47 -07:00
samd21pins.csv add port B to samd21, have our variant parser also check for aliased analog pins 2021-05-18 11:00:29 -04:00
samd51pins.csv add label types so samd51 appears 2022-04-25 16:48:16 -04:00
samd51pins.ods add label types so samd51 appears 2022-04-25 16:48:16 -04:00

PrettyPins

PrettyPins is designed to create lovely pinout diagrams.

KB2040 pinout diagram

Requirements

The following is a list of required software and files necessary to run PrettyPins:

  • A local clone of the PrettyPins repository
  • The Fritzing object file for the board for which you are generating a diagram (available here)
  • An SVG editor, such as InkScape (free and available for all major OS's) or Illustrator (not free, and not available for all major OS's)
  • Python 3 installed on your machine
  • A local clone of the CircuitPython repository (for boards that support CircuitPython)
  • The latest Arduino core for the board-type you're working with installed on your machine (for boards that support Arduino)
  • pip install the following libraries (in a virtual environment or otherwise):
    • click
    • lxml
    • svgutils
    • svgwrite
    • xmltodict

Running PrettyPins

  1. Place the Fritzing object file in the PrettyPins directory.
  2. Run the PrettyPins command as shown below.
  3. In the case of Arduino support, you must run the command TWICE for the Arduino pins to show up.
  4. Open the output.svg and pinlabels.svg files into your SVG editor.
  5. Save the output.svg file as something else, such as the name of the board you're diagramming.
    • In Illustrator, when you "Save as", click "Ok", (and "Yes" to replacing the file if it already exists), then, under "Advanced Options", change "CSS Properties" to "Presentation Attributes". and "Decimal Places" to "4". Then, click Ok.
  6. Copy the different seconds of labels out of pinlabels.svg into your working board file, and arrange them properly.
    • For pins that are not easily accessible (such as NeoPixels or displays), either draw extra lines to the pin location, or create an icon for the pin next to the board and attach the labels to that.
    • If you are replacing an old diagram (as with many of the ATtiny boards), include any notes from the original diagram in the new one.
  7. Verify the pin label layout with Kattni by providing a screenshot of your working board file.
  8. Finalise the diagram with the pin legend, any text blocks and the title/URL.
  9. Save the SVG as follows:
    • In Illustrator, do "Save as", click "Ok", (and "Yes" to replacing the file if it already exists), then, under "Advanced Options", change "CSS Properties" to "Presentation Attributes". and "Decimal Places" to "4". Then, click Ok.
    • In Inkscape, save the file.
  10. Finally, save the file as both a PDF and a PNG as well.

Upload Files

Once you have an SVG, PDF and PNG, you need to upload them to the following locations, and link to them where indicated.

The PNG

  1. The PNG gets added to the Pinouts page of the guide, rendered, immediately below the board image at the top of the page.

The PDF

  1. Upload to the board-specific EagleCAD PCB file repository on GitHub.
  2. Link under "Files:" on the Downloads page in the applicable board guide.
  3. Link on the Pinouts page in the applicable board guide (under the rendered PNG of the diagram).

The SVG

  1. Upload the SVG to Learn as a file using Media > Upload, under the "Files" section on the Downloads page. Title the file "PrettyPins SVG for Board Name".

Example PrettyPins Command Structure by Board Type

These are some examples of what the PrettyPins commandline command looks like, based on board chip type. More to be added soon!

ATMega328:

ATMega328 does not support CircuitPython.

python3 parser.py "Adafruit Metro Mini.fzpz" None atmega328pins.csv -s "^IO([0-9])" "D\1"

ATtiny8x

ATtiny8x does not support CircuitPython.

python parser.py "Adafruit Trinket 3V.fzpz" None attiny8xpins.csv

RP2040:

RP2040 does not have official Arduino support (yet).

python3 parser.py "Adafruit Feather RP2040.fzpz" path/to/circuitpython/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c rp2040pins.csv

python3 parser.py "Adafruit ItsyBitsy RP2040.fzpz" path/to/circuitpython/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c rp2040pins.csv

python3 parser.py "Adafruit QT Py RP2040.fzpz" path/to/circuitpython/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c rp2040pins.csv

ESP32-S2:

python3 parser.py "Adafruit Feather ESP32-S2.fzpz" path/to/circuitpython/ports/espressif/boards/adafruit_feather_esp32s2/pins.c esp32s2pins.csv

python3 parser.py "Adafruit Metro ESP32-S2.fzpz" path/to/circuitpython/ports/espressif/boards/adafruit_metro_esp32s2/pins.c esp32s2pins.csv -s "^D([0-9])" "IO\1"

python3 parser.py "Adafruit MagTag 2.9in.fzpz" path/to/circuitpython/ports/espressif/boards/adafruit_magtag_2.9_grayscale/pins.c esp32s2pins.csv -s "^D([0-9])" "IO\1"

python3 parser.py "Adafruit FunHouse.fzpz" path/to/circuitpython/ports/espressif/boards/adafruit_funhouse/pins.c esp32s2pins.csv -s "^D([0-9])" "IO\1"

ESP32:

python3 parser.py "Adafruit QT Py ESP32 Pico.fzpz" None -a ../../ArduinoSketches/hardware/espressif/esp32/variants/adafruit_qtpy_esp32 esp32pins.csv

python3 parser.py "Adafruit ESP32 Feather V2.fzpz" None -a ../../ArduinoSketches/hardware/espressif/esp32/variants/adafruit_feather_esp32_v2 esp32pins.csv

python3 parser.py "Adafruit HUZZAH32 ESP32 Feather.fzpz" None -a ../../ArduinoSketches/hardware/espressif/esp32/variants/feather_esp32 esp32pins.csv

nRF52:

python3 parser.py "Adafruit Feather nRF52840.fzpz" path/to/circuitpython/ports/nrf/boards/feather_nrf52840_express/pins.c nrf52840pins.csv -a ~/Library/Arduino15/packages/adafruit/hardware/nrf52/0.20.5/variants/feather_nrf52840_express

python3 parser.py "Adafruit ItsyBitsy nRF52840.fzpz" path/to/circuitpython/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c nrf52840pins.csv -a ~/Library/Arduino15/packages/adafruit/hardware/nrf52/0.20.5/variants/itsybitsy_nrf52840_express

python3 parser.py "Adafruit nRF52840 CLUE.fzpz" path/to/circuitpython/ports/nrf/boards/clue_nrf52840_express/pins.c nrf52840pins.csv -a ~/Library/Arduino15/packages/adafruit/hardware/nrf52/0.20.5/variants/clue_nrf52840

SAMD21:

python3 parser.py "Adafruit Feather M0 Express.fzpz" path/to/circuitpython/ports/atmel-samd/boards/feather_m0_express/pins.c samd21pins.csv -a ~/Library/Arduino15/packages/adafruit/hardware/samd/variants/feather_m0