P0 · Product Development with Forge — Building from the Library · Lesson 4 of 6

Interfaces — how blocks talk to each other

~11 min

Slide 1

Three buses: I2C, SPI, UART

Blocks have to talk to each other. Almost all of that happens over three "buses" — shared sets of wires with agreed rules. Knowing which is which lets you read any design at a glance.

  • I2Ctwo wires (SDA + SCL), shared by many devices, each with its own address. Slower, but wonderfully tidy. Library blocks on I2C: the SSD1306 OLED display, the INA219 current monitor, the PCA9685 servo driver.
  • SPIfour wires (data in, data out, clock, and a chip-select per device). Fast. Used by the microSD logger, the RC522 RFID reader, the LoRa SX1278 radio, the NRF24L01 link.
  • UARTtwo wires (TX + RX), a simple point-to-point serial link between two chips. Used by the HC-05 Bluetooth module, the DFPlayer MP3 module, and the SIM800L GSM module.

A rough rule: many small devices → I2C; fast data → SPI; a single module chatting to the controller → UART. Once you can name the bus, you understand how a block connects.

Forge draws these connections for you: the wiring diagram in Forge Design shows each part's pins and the wires between them, so you can see which lines are the shared bus and which device sits where on it.

Slide 2

Matching voltages — pull-ups and level shifting

Two small things trip up beginners when blocks connect — and the library handles both.

Pull-ups on I2C

An I2C bus needs two small pull-up resistors on the SDA and SCL lines to work at all. It's easy to forget; the I2C bus with pull-ups subcircuit bakes them in so the bus is reliable.

Voltage mismatch

Not every block runs at the same logic voltage. A 5 V sensor wired straight to a 3.3 V controller can damage it (or just not read). The fix is a bidirectional level shifter — it translates signals between 3.3 V and 5 V so both sides are safe.

You'll rarely place these yourself, but when Forge adds a pull-up block or a level shifter to a design, this is why. Spotting them tells you the parts are being connected safely, not just wired together.

This is also what the ERC (electrical rule check) in Forge Design is for. As it draws the wiring, Forge checks the connections and flags exactly these mistakes — a missing I2C pull-up, a 5 V line meeting a 3.3 V pin, a wire on the wrong pin. And because the wiring diagram is editable, you can add the missing block or fix the connection yourself and watch the check clear — catching the problem on screen instead of on the bench.

Quick check

An OLED screen and a current monitor both use just two wires and are addressed individually on a shared bus. Which bus is that?