MustafaMulla29/bluetooth-connected-pedometer
It defines a PCB footprint and schematic symbol for a row of solder pads used as wire connection points, featuring customizable spacing and label annotations.
- Version
- 0.3.0
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone MustafaMulla29/bluetooth-connected-pedometer # download the package files into ./bluetooth-connected-pedometer
tsci add MustafaMulla29/bluetooth-connected-pedometer # add it to your project as @tsci/MustafaMulla29.bluetooth-connected-pedometerIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
scripts/audit_build.py
#!/usr/bin/env python3
"""Read generated diagnostics; tsci's process status alone can miss DRC failures."""
import collections
import hashlib
import json
from pathlib import Path
import sys
root = Path(__file__).resolve().parents[1]
path = root / 'dist/index/circuit.json'
items = json.loads(path.read_text())
errors = [o for o in items if o['type'].endswith('_error')]
warnings = [o for o in items if o['type'].endswith('_warning')]
report = {
'circuit_sha256': hashlib.sha256(path.read_bytes()).hexdigest(),
'component_and_land_instances': sum(o['type'] == 'source_component' for o in items),
'purchased_components': sum(o['type']=='source_component' and o.get('name') not in ('J1','J2','J3','J5','J6') for o in items),
'traces': sum(o['type'] == 'pcb_trace' for o in items),
'vias': sum(o['type'] == 'pcb_via' for o in items),
'error_counts': dict(collections.Counter(o['type'] for o in errors)),
'warning_counts': dict(collections.Counter(o['type'] for o in warnings)),
'errors': errors,
'warnings': warnings,
}
(root/'docs/build-diagnostics.json').write_text(json.dumps(report, indent=2)+'\n')
print(json.dumps({k: v for k, v in report.items() if k not in ('errors','warnings')}, indent=2))
for o in errors[:30]:
print(o['type'] + ': ' + o.get('message', json.dumps(o)))
if errors:
print('FAILED: unresolved circuit errors. Do not fabricate this build.')
sys.exit(1)
print('No circuit error records. Remaining warnings and physical validation still require review.')