Blogfive-port gigabit switch OLED firmware
See a network switch come alive before it exists
See a five-port gigabit switch's OLED firmware run on its 3D board in the browser, with buttons and a serial console, before it is made.

What if you could press a button on a board before the board exists?
You press it, a screen lights up, and something you imagined answers back. It feels like tasting something you cooked yourself: simple, but yours.
We want everyone to get that feeling with hardware: idea, schematic, PCB, CAD and firmware, and seeing it work before anything is made.
Here, Inky wrote the OLED firmware for a five-port gigabit switch we designed, and we ran it on the board's 3D model in the browser. The screen shows ports, port detail, traffic and system info.
The port numbers are simulated: the RP2040 isn't wired to the switch chip yet.
The firmware

On the left is Inky's chat: it worked for 7 m 24 s and updated firmware/src/main.cpp to v1.0.1.
In the middle is that file in the Code tab. Under it, the Build panel shows Compiled OK, 71.9 KB, for an RP2040 (pico, Arduino) with the Adafruit SSD1306 and GFX libraries.
It fits comfortably on the chip:
- 3.5 % of the chip's 2 MB flash
- 3.8 % of its 256 KB RAM
The board beside the code

Simulate runs that build in the browser.
The code stays on the left. On the right is the board's own 3D model, with its OLED (U7) drawing what the firmware draws.
Under the code are the simulator's controls:
- Two buttons: SW2 and SW3
- A flat copy of the OLED
- A USB serial console printing the boot log as ports 1, 2 and 3 come up
Pressing a button on the model

Hover a button on the 3D board and hold it to press it, like a physical button.
Here, the cursor holds SW3 and the OLED opens port 1's detail, screen 2 of 4.
The bottom line of every screen says what the buttons do. Here, SW2 moves to the next port and SW3 goes back.
One port in detail

Two presses of SW2 step to port 3:
- Link up at 100 Mb/s full duplex
- Up for 1 min 33 s
- 7,849 packets received, 4,195 sent
- 54 errors
Every port screen says SIM: the firmware makes these numbers up. Once the RP2040 is wired to the switch chip, this screen is where the real counters would go.
Driving it from the serial console

The console under the code is the board's USB serial port.
You type down 2 and press Enter. The log answers “SIM command: P2 DOWN”, and both the flat OLED and the one on the 3D board now list P2 DOWN.
“up 2 1000” brings it back at 1000 Mb/s.
The system screen

The last of the four screens shows:
- Uptime 1 min 45 s
- 3 of 5 ports up (ports 2 and 4 are down)
- Firmware 1.0.1
- USB serial port at 115,200 baud
Before it comes a traffic screen with a bar and packets per second for each port. Four screens, two buttons: SW2 moves on, SW3 goes back to the ports.
This is only the beginning
This is one small example of what we are building toward.
Hardware should feel understandable and possible to make, not like a locked room that only a few people can enter.
We love people who build, and we want to support more of them, from the first idea to the moment a design comes alive in simulation.
What would you build if you could understand the whole path from schematic to firmware?
Build with us at heypcb.ai.


