Skip to content

2 – Install, set up and test

Get Serial Input Bridge from the Asset Store and import it. Make sure the Input System package is installed (Window > Package Manager > Unity Registry > Input System).

On Unity 2021.3, follow Unity 2021.3 setup first.

Serial ports need the .NET Framework API level. If Tools > Serial Input Bridge shows only one item, click it:

Tools > Serial Input Bridge > Fix API Compatibility Level

Unity recompiles and the full menu appears.

Open Tools > Serial Input Bridge > Control Panel. The Setup Checks list shows whether the project settings are right. Fix anything it flags.

Click Set Up Arduino in the Control Panel (or Tools > Serial Input Bridge > Set Up Arduino).

  1. Pick the board’s Port and click Connect to This Port. The window shows the Firmata firmware name and version.
  2. The board is scanned and every pin is listed under Pin roles. Each pin gets a default role: analog-capable pins become Analog In, the rest Digital In.
  3. Set the roles you need. For the demo circuit:
    • D2 → Digital In
    • A0 → Analog In
    • D13 → Digital Out
    • Use All Unused first if you’d rather start from a clean list and only turn on the pins you wired.
  4. Under Create Profile, give it a Profile Name and leave Also generate Input Actions ticked.
  5. Click Create Profile + Input Actions.

You now have a device profile and a matching .inputactions asset with one action per input pin, named after the pin (D2, A0, …).

  1. Drag Assets/SerialInputBridge/SerialInputBridge.prefab into the scene.
  2. On its SerialManager, drag your profile into Device Profile.

The prefab holds SerialManager, which opens the connection, and SerialToInputSystemAdapter, which turns board inputs into Input System controls. If you build your own GameObject instead, add both: without the adapter, inputs never reach your actions.

Leave Port Name empty to let it find the board, and keep Auto Connect On Start on.

Press Play, then open Tools > Serial Input Bridge > Input Monitor. Press the button and turn the knob. You should see D2 switch and A0 move between 0 and 1.

Nothing moving? See Troubleshooting.

React to a knob with AnalogInputEvent →