Videogame Controller
In this demo, we'll configure Syntien to send data via BLE to an ESP32-S3 microcontroller. The ESP32 is programmed to translate BLE input into USB HID gamepad data – so any device that accepts a standard USB gamepad (Mac, Windows, Linux, Steam Deck, etc.) will see Syntien as a regular controller.
Most of the configuration in Syntien is pretty simple. We'll use two tabs for this demo. The first one is just a basic mapping of all of the buttons on a typical gamepad. We're using the
The two thumb sticks are a little more involved. The host expects values from 0 to 255 representing the X and Y values, where (0, 0) is the top left corner and (255, 255) is the bottom right corner. For these controls, we send three bytes: first, a letter to indicate which button (or thumb stick) we're using. The second byte is the X value, scaled from 0 to 255, floored, and encoded as an 8-bit integer. The third byte is the Y value, scaled from 255 to 0 (because the axis is inverted), floored, and encoded as an 8-bit integer.
The second tab contains only the controls we need to play SuperTuxKart (an open-source kart racer), with a few of them expanded a bit so they're easier to interact with. We use an
After you plug the ESP32 into your computer, it should advertise itself as a BLE device, and you should be able to connect to it from the I/O screen in Syntien.
Now, you'll be able to use Syntien 2 as a Bluetooth gamepad!
Loading video…
Extensions
There are a ton of possibilities for extending this setup.
You could configure a button to send many BLE messages in quick succession by setting up multiple outputs with the "Delay" parameter, each successively longer than the last. In other words, button mashing.
You could connect multiple devices running Syntien 2 to the same ESP32 and play a game with 2 or more players controlling the same character.
You could use the Level Meter control as a "button", and configure the scaling such that the button is only pressed when you scream loudly. Ex: add a number like 30 to the output, clip it to a maximum of 1 and a minimum of 0, then round it. Any input over -29.5 dB would be registered as a button press, and any input under -30.5 dB would be registered as a button release.