Skip to main content
The pinout and properties of custom chips are defined in a Chip Definition JSON file. The file name should be <chip-name>.chip.json. For example, if your chip is called i2c-light-sensor, the file name should be i2c-light-sensor.chip.json. The JSON file should contain a single object with the following properties:

Complete Example

Pins

The pins array should contain the names of the pins for your chip, starting from pin number 1. If you wish to skip some pins (e.g. you want the breakout board to only have pins on its left side), use an empty string ("") for the pin name. For example:
The example above defines a chip with 5 pins, ordered as follows:

Controls

Controls provide a way for users to interact with your chip while the simulation is running. For example, a temperature sensor chip can have a control that lets the user set the current temperature. The controls property should contain an array of control objects. Each control object should have the following properties: For example:
To read the value of the control from your chip code, use the Attributes API.

Display

The display property allows you to attach a display to your chip. Use the display to implement a custom LCD, OLED, or e-paper display, or to show the state of your chip (e.g. draw a graph of the temperature over time, or visually indicate the state of a blinds controller). The display property should contain an object with the following properties: For example:
To draw on the display from your chip code, use the Framebuffer API.

JSON Schema

A JSON Schema for validating chip definition files is available in the wokwi-cli repository.