Skip to content

Turning a PC into an RC Transmitter: A PocketTX Experiment ​

PocketTX was originally designed for phones: plug it into a USB-C port, then control an RC model using virtual sticks or motion input. We had explored that approach before, and later revised the hardware's shape and connection setup to make it more convenient to plug directly into a phone.

When we told a customer about those improvements, they asked a question: could a computer work as the transmitter too?

A computer has USB ports and can connect to gamepads, flight sticks and other peripherals. PocketTX already handles radio transmission; the remaining task was to generate control data it could understand. That became the starting point for this experiment: ask AI to help build a web controller, connect real hardware, and see whether the whole chain would work.

The Control Chain ​

PocketTX receives control data over USB serial, then its internal ELRS transmitter communicates with the receiver on the aircraft. The computer can use the same path, moving the phone app's work into a browser.

The complete control chain looks like this:

text
Mouse / touchscreen / USB controller
        ↓
Browser: read inputs → map channels → encode CRSF frames
        ↓ USB serial
PocketTX: ELRS radio transmission
        ↓ Wireless link
ELRS receiver → flight controller or servos and ESCs → model movement

The computer reads the controls and prepares channel data. PocketTX handles radio communication, while the onboard hardware processes received commands according to its configuration.

This opens up more choices for input devices. We can start with virtual sticks to check the link, then connect a physical controller that the browser recognizes. Changing the input method leaves the PocketTX-to-ELRS-receiver path available for reuse.

Bringing in AI ​

The brief for AI was to build a dual-stick interface, send CRSF data over serial, support gamepad input, and display incoming link statistics and telemetry.

The project ended up split into a few parts: joystick.js handles the on-screen sticks, gamepad.js reads peripherals, crsf.js encodes and decodes the protocol, elrs.js manages serial communication, and main.js connects them all.

Development footage showing AI-assisted code generation and an interface preview for the web controller in VS Code

The middle of the video condenses the repeated rounds of code changes. It took about two hours to get from the initial request to something ready for hardware testing. Drawing two sticks on the screen was one step along the way; channel behavior, data reception at the transmitter, binding and telemetry all needed checking too.

Building the interface, handling input events and drafting protocol code were useful tasks to give AI. Once hardware was connected, we still needed to check the results against what the devices actually did.

Channel Data ​

Sticks and switches ultimately become channel values in the control link. The web controller's virtual sticks currently use this mapping:

ChannelFunctionVirtual stick input
CH1RollRight stick, horizontal
CH2PitchRight stick, vertical
CH3ThrottleLeft stick, vertical
CH4YawLeft stick, horizontal
CH5, CH6 and othersArming, modes and auxiliary functionsOn-screen switches

The protocol layer packs 16 channels, each using 11 bits, into 22 bytes. Adding the header, frame type and CRC produces a 26-byte CRSF channel frame. The implementation is available in the project's CRSF encoding code.

Transmission needs to be continuous. After the serial port connects, the current main program reads and sends the current channels at a target rate of 100 Hz.

Testing ​

Depending on the computer's ports, a USB adapter or extension cable that carries data can connect PocketTX. Once the computer recognizes its serial port, that port can be selected in the web interface.

The Connected indicator initially means that the serial port has opened.

The wireless side still follows ELRS binding rules. The transmitter and receiver need compatible frequency bands and firmware versions, along with correctly configured binding information. Devices already configured with the same Binding Phrase can keep those settings. The page also provides a Bind Mode button when rebinding is needed. See the official ExpressLRS binding guide for the requirements.

For the final test, the computer ran the web controller with the transmitter connected and a micro quadcopter on the desk. We then checked its response using the virtual sticks.

Desktop test from the video: a laptop running the dual-stick web interface controls a nearby micro quadcopter through the transmitter

Moving a stick changed the channel bars on the page. Establishing the wireless link brought in link statistics. Changing the arming and throttle inputs produced the corresponding response from the aircraft.

The interface also includes telemetry fields for voltage, current, consumed capacity and flight mode. On the serial side, the program continuously reads and parses CRSF data. Which fields can show values depends on the receiver, flight controller and the telemetry they actually send. The implementation is in the communication layer.

Space at home was limited, and operating the virtual sticks was awkward, so the test was brief. The demonstration confirmed the path from computer input to a response on the real aircraft.

Peripheral Inputs ​

External input is one of the more interesting parts of this setup. There was no gamepad on hand during filming, so we used an RC transmitter with a USB joystick mode instead.

In this arrangement, the RC transmitter sends stick inputs to the computer over USB. The browser converts them into channel data, then sends that data through PocketTX to the aircraft.

A laptop connected to an RC transmitter through a USB hub, using the transmitter's USB joystick mode for input, with the test quadcopter nearby

Gamepads, flight sticks and even racing wheels could be tried next, provided the operating system and browser recognize them.

The current gamepad code follows a typical Xbox/PlayStation layout. Its mapping differs from the on-screen sticks: the left stick controls roll and pitch, while the right stick controls yaw and throttle. For throttle in particular, the code maps the axis's full travel from minimum to maximum output, so centering that axis produces roughly half throttle.

What Else Could We Try? ​

This experiment gives PocketTX another way to work. A phone remains convenient for portable control, while a computer makes it easier to connect more peripherals and inspect channels and telemetry.

The next areas we would like to improve are peripheral mapping, stick calibration, throttle hold and cut, and saved configurations for different models. A steering wheel and pedals could be interesting for an RC car; a flight stick could be worth trying for a fixed-wing aircraft.