Game Controller Testing
The Controllers tab in the right sidebar is a live tester for USB / BLE game controllers — gamepads, joysticks, sim-racing wheels — connected to your computer. You'll use it whenever you're building a HID device with NodeBlue (see Building USB HID Devices) to verify that buttons, hats and axes report what your firmware intended.
When the connected controller happens to be a NodeBlue board running its own firmware, the tab also surfaces the IDE-side panel for board administration: firmware version, project the firmware was built from, per-axis dead zones / invert / calibration, optional non-linear spline editing, and one-click firmware update.
The tab works in browsers that support WebHID (Chrome / Edge 89+). Without WebHID, Board Server must be running — see Board Server installation. BLE controllers (NRF52 BLE-Gamepad / -Keyboard) also work via Web Bluetooth.
Opening the tab and pairing a controller
Click Controllers in the right sidebar. If no controller is detected, the tab shows a message and a Pair Controller button — click it and pick your device in the browser's pairing dialog.
USB controllers can also simply be plugged in and the tab will discover them within ~2 seconds.
The controller header
At the top of the tab:
| Element | What it shows |
|---|---|
| Dropdown | All known controllers — pick which one the tab is currently displaying. The choice is remembered across reloads. |
| VID / PID line | The 16-bit Vendor ID and Product ID of the selected controller (hex). For Bluetooth controllers a small BT tag appears next to the values. Hidden when both VID and PID are zero (some virtual / hub controllers). |
The VID/PID line is the easy way to confirm a board's identity matches the firmware build — particularly useful for BLE devices where the PnP-ID advertising the VID/PID is something the firmware sets explicitly.
Live state
For each controller the tab renders three families of inputs:
Buttons
Each button is a numbered box. Pressed → green. Released → grey. Useful for verifying button-to-pin mappings as you wire things up.
POV hat switches
If the controller exposes a POV hat, it appears as eight directional arrows around a centre dot. The currently-pressed direction lights up.
Analog axes
Each axis row contains:
- The axis name.
- A numeric value (in the unit selected below).
- A bar showing the current position over its full range.
- A small graph toggle (
~) on the right — click to fold a per-axis scrolling history graph open / closed.
Axis units
Use the Axis Units dropdown to change how axis values are displayed:
| Unit | Description |
|---|---|
| None | No numeric display. |
| Raw | Raw unsigned value (0..65535). |
| Raw Signed | Signed value (-32768..32767). |
| Percentage | 0..100 %. |
| Voltage (1.2 V – 5 V) | Scaled to common ADC reference voltages — confirms the firmware's ADC → HID mapping against a meter. |
NodeBlue-board side panel
When the connected controller is a NodeBlue board (i.e. a board running NodeBlue firmware that exposes a USB-HID Config interface, or a BLE-paired NodeBlue peripheral), an extra block appears under the dropdown with:
| Field | Where it comes from |
|---|---|
| Board name | Looked up from board_defs.js by the controller's VID/PID. |
| Firmware version | Read live from the board over the NBI protocol (the same channel the dashboard uses). |
| Project | The project the firmware was built from — name and project number — both linkable: clicking the project name opens it in the editor. |
| Update available link | Shown only when the server has a strictly newer firmware version for this board than what it currently runs. Clicking it kicks off the in-browser update flow (no driver needed). |
One-click firmware update
When an Update available link is shown:
- Click it.
- The IDE switches the board into bootloader mode (HID reset, then WebUSB / WebSerial bootloader handshake depending on the board family).
- The new firmware is flashed.
- The board re-enumerates with the new version, and the version field updates in place.
The update flow restores EEPROM (calibration / dead-zone / invert / spline settings) when the board family supports it — your tuning survives the update.
Per-axis tuning — dead zones, invert, calibration, spline
For each axis the connected NodeBlue board declares as tunable, the row gets a second strip of controls beneath the bar:
| Control | Effect |
|---|---|
| Calibrate button | Starts the calibration routine on the board for this axis — sweep the axis through its physical extremes (left/right lock, full pedal travel), click again to Stop Cal and the board persists the learned min/max to EEPROM. |
Low dead zone (%) | Percent of travel ignored at the low end (the value at the bottom of the bar). Stretched: full output range still reached past the dead-zone. Saved on change. |
| Invert checkbox | Flip the axis polarity. Saved on change. |
High dead zone (%) | Mirror of Low dead zone, at the top of the travel. |
The values you set are written immediately over the NBI link to the board, and persisted to its EEPROM on the board side — no firmware rebuild needed. The same persistence model the nRangeModule calibration uses.
Spline editor — non-linear response curves
When the board's firmware uses a nCubicSpline on the axis, an extra S button appears at the right of the controls strip. Click it to open an inline spline editor:
- The X / Y control points of the spline are drawn over the input → output mapping.
- Drag points to reshape the curve, add or remove points, type exact values.
- Changes are written live to the board's EEPROM — saved immediately.
Typical use: a load-cell brake pedal where the spline shapes force vs. pressure — slack at the top of travel, progressive once the pedal bites, linear into the lock-up region.
Multiple controllers
Several controllers connected at once? The header dropdown lists all of them — pick which to display. The tab remembers your selection across reloads, keyed off the controller's VID/PID, so the per-controller graph-visibility / unit-choice state survives unplugs and refreshes.
Putting it to work
A typical iteration loop while building a HID device:
- Wire your buttons / sensors / encoders into an
nHIDon the canvas. - Upload the firmware.
- Open the Controllers tab — the new device shows up.
- Press each button, verify the right box turns green; move each axis, watch the bar move; check the value is in the expected range using the Voltage / Percentage units as needed.
- If a value's out of bounds, tweak the Range / RangeDeadZone module in the project, re-upload. Once you're happy, set the persistent dead zone + invert + calibration from the Controllers tab itself.
Now's a good time to come back to Building USB HID Devices and apply what the tester has confirmed.