So I gave SKiDL a short test. After writing about 80 lines of (kinda) reusable stuff, I can describe my toy example like this:
#createPart connects all GND and VCC pins and puts 100nF on each VCC Pin mcu = createPart(Part("MCU_ST_STM32F1", "STM32F103C8Tx", footprint="Package_QFP:LQFP-48_7x7mm_P0.5mm"), True) #rename Pins for SPI use mcu.PA5.name = "SCK" mcu.PA6.name = "MISO" mcu.PA7.name = "MOSI" #custom part, renames Pins for SPI and uses createPart bme = bme280("SPI") #Connects all SPI signals connectSPI(mcu,bme,CS=mcu.PA4) #add Pullup to Pin pullup(mcu.PA8, r="1k") #add LEDs and series resistor ledResistor(mcu.PA3, I=10, Vf=1.4) ledResistor(mcu.PA2, I=20, footprint="LED_0805_2012Metric")
(This example has no intention of being complete, also I am in no way a trained/skilled electrical engineer)
And get this Board (crappy placement by me + freerouting 1.3).
I rename some pins and the bypass caps, so I know immediately where they go.
I don’t know if this in any way how it was meant to be done or helpful at all.
It was a nice experience and I can totally see how repeating tasks are easy to solve with SKiDL. It would be awesome, if it was possible to also get a schematic, because that is what other people understand.
Here is the complete script.