Blog about Web Programming and Electronics
💬 👤
back Back to blog
WEB (HTML, CSS, PHP)

Building a Web-Based Arduino and Electronics Simulator with Junie: Phase 1 & 2

Have you ever wondered what it takes to build your own web-based electronics simulator in the spirit of tools like Wokwi or Tinkercad Circuits? Together with Junie (my AI programming assistant), we joined forces to tackle this exact challenge.

Instead of relying on heavy desktop software (such as KiCad or EasyEDA), our goal was to engineer a visually engaging, lightweight, and blazing-fast web IDE tailored specifically for Arduino and ESP boards, modules, and sensors.

Here is a comprehensive breakdown of what we built across the first two development phases.

Phase 1: Laying Foundations & Fullscreen IDE Architecture

The primary objective of the first phase was establishing a modern, distraction-free fullscreen workspace (100vw × 100vh), providing makers with an uncluttered environment optimized for rapid circuit prototyping.

Key deliverables in Phase 1:

  1. Fullscreen IDE Layout:
    • Top Toolbar: Controls for running simulations, wire color selection, grid toggling, and canvas view reset.
    • Left Sidebar: Project configuration, utility tools, and quick actions.
    • Right Sidebar: Structured component catalog categorized by component types (microcontrollers, passive elements, sensors, displays, actuators).
    • Bottom Drawer: Integrated C++ code editor for Arduino firmware alongside an interactive serial monitor.
  2. Interactive Canvas Engine: Coordinate grid rendering with smooth panning (Pan) and fluid zooming (Zoom), combined with drag-and-drop component placement and automatic grid alignment (Grid Snap).
  3. Vector Component Catalog (SVG): Handcrafted realistic models including Arduino Uno, Arduino Nano, ESP32 DevKit, Breadboard, LEDs, resistors, pushbuttons, potentiometers, HC-SR04 ultrasonic sensors, OLED displays, and servo motors.
  4. Initial Wiring System: Pin-to-pin wire routing with a preloaded starter demonstration circuit (Arduino Uno + Resistor + LED).

Phase 2: Advanced 90° Routing, Multi-language Support, and Themes

The second phase focused heavily on ergonomics, precision, and frictionless user experience, refining connection manipulation to feel intuitive and reliable.

Upgrades delivered in Phase 2:

  1. Straight Wires & 90° Orthogonal Waypoints:
    • Transitioned from default curved bezier lines to crisp, straight segments standard in electrical schematics.
    • Added waypoint routing: users can click anywhere on the canvas while routing a wire to introduce 90° bend points.
    • Double-clicking an existing wire introduces an interactive handle that can be repositioned or deleted.
  2. Professional Wire Manipulation:
    • Eliminated disruptive browser confirmation dialogs — selected wires highlight with a subtle glow and are deleted via Delete or Backspace.
    • Interactive endpoint handles allow detaching and reconnecting wires to different pins seamlessly.
  3. Magnetic Pin Snapping: Pins illuminate dynamically when a wire endpoint approaches, snapping cleanly into place.
  4. Bilingual UI (Slovenian & English): Modular internationalization engine (i18n.js) enabling instant runtime switching of all tooltips, labels, and component descriptions between Slovenian (🇸🇮 SL) and English (🇬🇧 EN).
  5. Light & Dark Visual Modes: Built-in theme toggling between a developer-friendly dark scheme and a crisp light mode with persistent browser storage.
  6. High-Resolution Display Optimization: Resolved SVG clipping boundaries, ensuring flawless wire rendering across large monitors (e.g. 27-inch displays).

Looking Ahead: What Lies Ahead?

With solid architectural foundations now firmly in place, upcoming milestones will focus on:

  • Expanding the component library with additional Arduino/ESP shields, sensors, and ICs.
  • Circuit saving and multi-format exporting (JSON project files, PNG and SVG schematics).
  • Interactive execution and simulation logic (compiling/running Arduino code with real-time component feedback).

Collaborative Engineering & Open Tools

This milestone highlights how human vision paired with AI-driven development can rapidly deliver responsive, browser-native engineering tools. Stay tuned for future updates as we expand interactive simulation features directly within the web browser.

back Back to blog