A pin can fit and still be wrong.
A microcontroller’s pins aren’t interchangeable. An input-only GPIO cannot drive a trigger signal; an ADC channel may become unavailable with Wi-Fi. Catching those constraints before wiring saves a frustrating debugging session.
Check the plan before the build.
PinCheck is a static Python CLI validator. It compares a board definition with peripheral signal mappings and reports errors and warnings. It checks assignments, rather than measuring a physical circuit.
Architecture
The CLI parses repeatable -a assignments and an optional --wifi flag. The validator loads modular JSON definitions, checks each mapped signal, and collects a report. Validation errors return exit code 1; warnings alone do not fail validation.
Implemented checks
- Warnings for boot-strapping pins and logic-voltage ranges.
- Errors for input-only restrictions, reserved or invalid pins, unknown signals, and missing required pin capabilities.
- ESP32 ADC2 conflicts when an ADC signal is used with
--wifi. - Duplicate-pin collisions, with a shared I2C/SPI exception for matching bus and signal names.
These checks are limited to the supplied definitions and implemented rules. PinCheck is a planning aid; its output does not establish electrical safety or a complete working circuit.
Try it locally
git clone https://github.com/BasselWael/pincheck.git cd pincheck pip install -e . python3 -m pincheck.cli --list python3 -m pincheck.cli --board esp32_devkit_v1 \ -a hc_sr04:TRIG=34,ECHO=35
The final command produces the real error report shown above. --list lists Arduino Uno R3, ESP32 DevKit V1, and Wemos D1 Mini board definitions, plus HC-SR04, MPU6050, and analog soil-moisture peripheral definitions.
Contribute a definition
Add a board JSON file under pincheck/data/boards/ or a peripheral under pincheck/data/peripherals/. Match the existing schema, run python3 -m pytest, and open a pull request. The repository includes schema tests and an ESP32 conflict test.