# Overview

What a module is, where it plugs into the Kode Dot, and the five that exist, with what each one adds.

## What it is

A module is a board that plugs into the 20-pin expansion header on the top edge of the Kode Dot and adds something it does not have on its own. Plug it in, open its app, and the Kode Dot does the new thing.

There are five. Maker, Robotics and Camera stand upright on the top edge. Mesh and F*CK are radios with antennas, so they come in a case that rests against the back. Every module takes the whole header, so one goes in at a time.

For your own code, a module is the 14 GPIOs of the header and whatever sits on the other side. Each module page says which GPIO is what, by number, so you never count pins.

## How it is connected

**Maker, Robotics and Camera** plug straight in through a right-angle 2.54 mm connector, with their components on the same side as the screen. **Mesh and F*CK** sit on the interposer, a passive adapter inside their case that carries every header signal straight through to the board.

Camera, Mesh and F*CK use only the header's 3.3 V. Maker and Robotics also use its 5 V, which comes from the USB cable through a 2 A fuse; on battery that 5 V stays off until your firmware asks the charger for the boost, which gives 0.5 A. In a kodeOS app the 3.3 V is off as well until the app calls `kode_exp_power(true)`, since kode-sdk v00.00.26. The header's pinout is in `device/expansion`.

## The modules

| Module | What it adds | Where it goes | Page |
| --- | --- | --- | --- |
| Maker | A mini breadboard and every header pin in one labelled row | On the header, upright on the top edge | `modules/maker` |
| Robotics | Two DC motors, a servo, an I2C port and four pins for sensors | On the header, upright on the top edge | `modules/robotics` |
| Camera | A 5 MP OV5640 with autofocus on an 8-bit parallel bus | On the header, upright on the top edge | `modules/camera` |
| Mesh | A LoRa radio and a GNSS receiver | In a case, on the interposer | `modules/mesh` |
| F*CK | Sub-GHz, 2.4 GHz, Wi-Fi 6 and GNSS radios | In a case, on the interposer | `modules/fck` |
| Interposer | Nothing: a passive 20-pin adapter for the two radio modules | On the header | `hardware/interposer` |

The five modules and the interposer are revision 1.0 boards. Each page names the issue of the board it describes, and the schematic of every board is in `hardware/overview`.

## Gotchas

> **WARNING**
>
> **A module that shows no sign of life may be in the wrong way round.** The connector of Maker, Robotics and Camera also fits turned round. Power is safe both ways, but every GPIO moves. The tables on each page are for the module with its components on the screen side; Camera gives both ways, because both work.

> **WARNING**
>
> **The module's pin numbers and the Kode Dot's do not match.** The connector of Maker, Robotics and Camera meets the header mirrored: its pin 1 lands on the header's pin 19. Mesh and F*CK go through the interposer, which undoes the mirror. Wire by GPIO number, which is what every table gives.

## In the SDK

- [`kode.h`](https://github.com/kodediy/kode-sdk/blob/main/components/kode/include/kode.h): `kode_exp_lend()` takes a module's header positions under a name and gives you their GPIO numbers, `kode_exp_ctrl()` takes an I2C, SPI or UART controller for it, and `kode_exp_power(true)` switches the header's 3.3 V on. The header carries no identification, so the app that drives a module is what says it is there.
- `device/expansion`: the header every module plugs into.
- `hardware/overview`: the schematic of every module, to view and download.
