Welcome
RGX Emulator is a browser-based simulator for the RGX Advanced Kit — an Arduino Nano-based educational controller board designed for students aged 12–17. It is part of the RGX product line by RoboGeeX.
With RGX Emulator you can build virtual circuits, wire components, write Arduino C programs using blocks or code, and simulate everything in real time — all from your browser, with no installation required.
When you are ready, you can compile and upload your sketches to a real Arduino board directly from the browser using Web Serial or WebUSB.
Getting Started
- Visit rgxemu.robogeex.com in a modern browser (Chrome, Edge, or Chromium-based recommended).
- On your first visit, the app caches all resources for offline use. After that, it works fully offline.
- You can install it as a PWA (Progressive Web App) for a native app-like experience — look for the install prompt in your browser's address bar.
Interface Overview
The interface is divided into several areas:
Toolbar (top bar)
The main toolbar contains:
- New / Save / Load -- project management (JSON files)
- Undo / Redo -- undo and redo circuit changes
- Export SVG -- download the current circuit as an SVG image
- Run / Stop -- start and stop the simulation
- Circuit / Code -- switch between circuit building mode and code editing mode
Code Toolbar (inside Code mode)
When you switch to Code mode, a secondary toolbar appears with:
- BLOCKS / CODE tabs -- switch between the Blockly visual editor and the text code editor
- File menu -- contains Examples, Load (.mix/.ino), Save (.mix/.ino), and Board selection
- Verify (checkmark icon) -- compile on cloud server to check for errors (requires internet)
- Upload (arrow icon) -- compile and flash to a real Arduino via USB (requires internet)
Component Library (left sidebar)
A scrollable panel listing all available components organized by category: RGX Board, LED Modules, Switches, Sensors, Monitors, Communication, and Actuators. Drag or double-click/tap a component to add it to the canvas.
Canvas (center area)
The main drag-and-drop workspace where you place components and wire them together. Supports pan and zoom for working with larger circuits.
Properties Panel (right sidebar)
Displays properties and settings for the currently selected component. Allows you to configure values, view pin assignments, and adjust component-specific parameters.
Code Area (Blocks + Code tabs)
Two tabs at the bottom-right: Blocks (Blockly visual editor) and Code (Arduino C text editor). You can switch between them freely.
Serial Monitor & Console (bottom panel)
Shows Serial.print / Serial.println output during simulation.
The Console tab displays system messages, errors, and compilation feedback.
Building Circuits
Adding the RGX Board
Drag the RGX Board from the component library onto the canvas, or double-click (tap on mobile) to place it automatically. Every circuit needs exactly one RGX Board.
Adding Modules
Drag any module (LEDs, switches, sensors, actuators, etc.) from the library onto the canvas. You can also double-click or tap a library item to add it at a default position.
Wiring
Click a port on the RGX Board, then click the connector on a module to create a wire. You can also start from the module connector and click the board port -- wiring is bidirectional.
Wire Routing
- Add a routing node: Click on an existing wire to insert a bend point.
- Reposition: Drag any routing node to adjust the wire path.
- Remove a node: Double-click a routing node to delete it.
Deleting Components
Select a component on the canvas, then press Delete or use the right-click context menu to remove it along with its wires.
Pan and Zoom
- Zoom: Use the mouse scroll wheel to zoom in and out.
- Pan: Click and drag on an empty area of the canvas to pan the view.
Component Library
RGX Board
ControllerArduino Nano-based controller with 14 RJ11 ports. This is the main board that all modules connect to.
LED Modules (A01)
OutputSingle-color LED modules. Connect only to Y-type (Yellow wire) ports.
Switches
InputSensors
InputMonitors
OutputCommunication
InputActuators
OutputProgramming
Blocks Tab (Blockly Visual Editor)
The Blocks tab provides a Blockly-based visual programming environment. Drag and snap blocks together to build your Arduino program without writing code. Categories include Logic, Loops, Math, Text, Variables, Functions, and Arduino-specific blocks for I/O, Serial, and more.
Code Tab (Arduino C Text Editor)
The Code tab features a professional code editor (powered by Ace Editor) with:
- Syntax highlighting -- Arduino functions (
digitalWrite,analogRead, etc.) are colored distinctly from C++ keywords, constants, strings, and comments - Line numbers -- shown in the left gutter
- Auto-indentation -- press Enter after
{and the next line auto-indents. Press Ctrl+Shift+F to reformat the entire file - Autocomplete -- start typing an Arduino function and suggestions appear with parameter hints and descriptions. Statement functions insert with a semicolon automatically
- Bracket matching -- click near a brace to see its matching pair highlighted
- Active line highlighting -- the current line is subtly highlighted
- Find & Replace -- Ctrl+F to find, Ctrl+H to replace
- Toggle comments -- Ctrl+/ to comment/uncomment lines
When you switch from the Blocks tab to the Code tab, the code is automatically generated
from your blocks. You can also write code manually or load .ino files.
Running Simulations
Click the Run button in the toolbar to start the simulation, and Stop to halt it.
How it works
- The interpreter compiles your Arduino C sketch into a JavaScript generator function.
delay()truly pauses execution usingyield— timing is accurate to the millisecond.- LED modules light up and dim based on
digitalWriteandanalogWritecalls. Serial.printandSerial.printlnoutput appears in the Serial Monitor panel. Use the mode selector dropdown to switch between Simulator and Hardware serial modes.- System messages, compilation info, and runtime errors appear in the Console panel.
Verify & Upload
Verify
Compiles your sketch on a cloud server and reports success or errors, along with the binary size. Requires an internet connection.
Upload
Compiles your sketch on the cloud server, then flashes the resulting binary to a real Arduino board connected via USB.
| Platform | API | Notes |
|---|---|---|
| Windows / Mac / Linux | Web Serial API | Works with any USB chip, no driver issues. |
| Android | WebUSB API | Requires an OTG cable and Chrome browser. |
| iOS | Not supported | Apple does not implement WebUSB or Web Serial. |
Auto-Detection
The uploader automatically detects the board by trying multiple baud rates:
- 115200 — New Optiboot bootloader
- 57600 — Old bootloader
- 19200 — ATmega168
It also reads the chip signature to confirm the target device.
Supported USB Chips
CH340 / CH340G, CP2102, FTDI FT232R / FT232X
Board Override
If auto-detection is not working correctly, select Arduino Uno under File > Board to skip auto-detect and target the Uno directly.
Hardware Serial Monitor
The serial monitor panel has two modes, selectable from the dropdown at the top of the panel:
- Simulator (default) — shows
Serial.printoutput from the running simulation. - Hardware — connects to a real Arduino board over USB for live serial communication.
Using Hardware Mode
- Select Hardware from the serial mode dropdown.
- Pick a baud rate (9600, 115200, 57600, 19200, or 4800).
- Click Connect and select your Arduino from the browser dialog.
- Incoming serial data from the Arduino will appear in the monitor.
- Type in the input box and press Enter to send data to the Arduino.
Platform Support
| Platform | API Used | Notes |
|---|---|---|
| Windows / Mac / Linux | Web Serial API | Same API used for uploading on desktop. |
| Android | WebUSB API | Uses the same OTG transport as Upload (via createTransport()). |
| iOS | Not supported | Apple does not implement WebUSB or Web Serial. |
Important Notes
- If the hardware serial monitor is connected when you click Upload, the serial connection is automatically disconnected to free the port for flashing.
- After uploading, you can reconnect the serial monitor to see output from your newly uploaded sketch.
Offline Mode
After your first visit, a service worker caches the entire application for offline use.
Works offline
- Circuit building and wiring
- Blockly visual editor
- Simulation and code execution
- Save and load projects
- All example projects
Requires internet
- Verify (cloud compilation)
- Upload (cloud compilation + flash)
The app auto-updates when you are online. Scripts use a network-first caching strategy, so you always get the latest version when connected.
RGX Port Map
The RGX Board has 14 RJ11 ports. Each wire color maps to a specific Arduino pin:
| Port | Yellow Pin | Red Pin | Black Pin | Type |
|---|---|---|---|---|
| P1 | D13 | — | — | Y |
| P2 | A1 | A2 | — | YR |
| P3 | — | A3 | — | R |
| P4 | A4 (SDA) | A5 (SCL) | — | I2C |
| P5 | — | A6 | — | R |
| P6 | — | A7 | — | R |
| P7 | D2 | — | — | Y |
| P8 | D4 | A0 | — | YR |
| P9 | D3 (PWM) | — | D5 | YB |
| P10 | D6 (PWM) | — | D11 | YB |
| P11 | D7 | — | — | Y |
| P12 | D8 | — | — | Y |
| P13 | D9 (PWM) | — | D10 | YB |
| P14 | D12 | — | — | Y |
Supported Arduino Features
| Feature | Status |
|---|---|
setup() / loop() | Supported |
| User-defined functions | Supported |
Arrays (byte arr[] = {...}) | Supported |
sizeof() | Supported |
delay() with true timing | Supported |
#define macros | Supported |
for / while / do-while | Supported |
switch / case / break | Supported |
Bitwise operators (>> << & | ^ ~) | Supported |
Ternary operator (? :) | Supported |
Serial.print / Serial.println | Supported |
digitalWrite / digitalRead | Supported |
analogWrite / analogRead | Supported |
random() / map() / constrain() | Supported |
| String methods | Supported |
char arrays / strcpy | Supported |
| Pointers / structs / classes | Not supported |
Keyboard Shortcuts
| Shortcut | Action | Mode |
|---|---|---|
| Ctrl + Z | Undo | Circuit |
| Ctrl + Y | Redo | Circuit |
| Ctrl + S | Save project | Both |
| Ctrl + Enter | Run simulation | Both |
| Delete / Backspace | Remove selected component | Circuit |
| R | Rotate selected component | Circuit |
| Escape | Cancel wiring / deselect | Circuit |
| Space + drag | Pan canvas | Circuit |
| Mouse wheel | Zoom in / out on canvas | Circuit |
| Tab (in code editor) | Insert 2 spaces (auto-indent) | Code |
| Ctrl + Shift + F | Auto-indent entire file | Code |
| Ctrl + D | Duplicate current line | Code |
| Ctrl + / | Toggle line comment | Code |
| Ctrl + F | Find in code | Code |
| Ctrl + H | Find and replace | Code |
Troubleshooting
"Access denied" on Windows
The Web Serial API handles port access automatically. If you still see this error, make sure no other program (Arduino IDE, serial monitor, etc.) has the COM port open.
Upload fails on Android
- Make sure you are using Chrome on Android.
- Connect your Arduino via an OTG cable.
- When the USB picker dialog appears, select your Arduino device.
Blocks glowing after save
This visual glitch has been fixed. If it still occurs, refresh the page to clear the state.
"You are offline" message
Verify and Upload require an internet connection for cloud compilation. Connect to the internet and try again. All other features work offline.
iOS devices
Upload is not supported on iOS because Apple does not implement the WebUSB or Web Serial APIs. Use a computer (Windows, Mac, or Linux) or an Android device to upload sketches.
Sketch compiles but upload fails
Try pressing the Reset button on your Arduino board just before clicking Upload. This puts the bootloader into a ready state for receiving the new firmware.