I2C sensor breakout

Generated component files for an ATtiny85 and an LM75, a 4.7 kΩ pull-up on each bus line, and named SDA/SCL nets between them.

Click through the files — it's the whole project

I2C sensor breakout — Visual Studio Code
Select a file from the explorer
ATtiny85 + LM75 generated parts · I2C · pull-ups

What's going on

  • ATtiny85_20S.ts and LM75.ts are generated files — typecad-pcb add component wrote them from the KiCAD library. Each pin gets a name and a type, so sensor.SDA replaces u2.pin(1).
  • One 4.7 kΩ pull-up per bus line, both to VCC. They live on the nets, not on a special I2C object — SDA and SCL are just named nets.
  • The LM75's address pins are grounded, which fixes its address at 0x48. Tie them differently and you get 0x49 through 0x4F — eight sensors, one bus.
  • Generated files are ordinary TypeScript: check them into git, edit them, hand them to typecad-pcb add component again only when the part changes.

Generate the parts

terminal
cd my-project/hw
npx typecad-pcb add component      # KiCAD library → ATtiny85-20S
npx typecad-pcb add component      # KiCAD library → LM75

Pick KiCAD library and search for the part — the tool writes the file into hw/src/ next to your entry file. The ATtiny85 file here also names the two USI pins that double as SDA and SCL.

Where to go next

  • Components — the add-component tool, generated files, and typecad-pcb search
  • Connections — named nets and everything else net() does
  • Placement — fromLeft, fromRight, and the edge-relative helpers
© 2026 typeCAD — code-defined electronics github