The Code window
Write sketches and Python, load firmware, build flowcharts, and run on the bench.
Open it#
Select a board and click Edit Code… in its properties, or choose Window › Code. The window opens beside the circuit. The sidebar lists every board in the circuit; the editor is in the middle, the console at the bottom and the debugger on the right.
Choose how the board is programmed#
The Program control in the toolbar shows the choices the board supports:
| Choice | For |
|---|---|
| Sketch | Arduino C++ in Coppa’s interpreter. |
| Python | MicroPython on the Pico, Python on the Raspberry Pi 4. |
| Flowchart | A program built from blocks. See Flowchart programming. |
| Firmware | A compiled .hex or .elf. See Running firmware. |
Write and run#
- Write the program, or pick one from More › Examples: Blink, AnalogReadSerial, Fade, Debounce, Hello LCD, I²C LCD, OLED, NeoPixels, Keypad, LED matrix and Temperature for Arduino-style boards; blink, PWM fade and ADC for the Pico. The examples follow the board, and there are none for the PIC, which runs firmware only.
- Press Run (⌘R) in the circuit window for a fixed run, or Run on Bench in the Code window to keep it running in real time.
The subtitle says where the program runs, such as Runs in Coppa’s sketch interpreter, and while the bench runs, Running sketch interpreter · 3.2 s. If it falls behind real time, it says how far, such as 80% of real time.
A sketch that doesn’t compile shows the error in the subtitle and shades the line red. A runtime error stops the program with Line N: and what went wrong. If the page has no ground, the subtitle and the Log say add a ground.
The More menu#
- Examples.
- Load Firmware… on boards that run firmware.
- Export Sketch… and Upload to Board…. See Put a sketch on a real board.
Show Console shows the serial monitor and plotter; Debugger shows the debugger.
Applies to Coppa 0.1 Preview 14. Last updated 22 November 2026.