atctwo / bbrx

RC receiver controlled using Bluetooth gamepads
1 stars 1 forks source link
arduino bluepad32 bluetooth radio-control receiver

bbrx!

Hello! This is a receiver for radio-controlled devices like drones or quadcopters or battlebots, except instead of using the type of RF signals a flight controller uses, bbrx uses any Bluetooth gamepad.

diagram showing multiple bluetooth controllers sending data to bbrx, which then sends data to an electronic speed controller, which is driving a motor

bbrx is written with the Arduino framework, using the Bluepad32 controller library, and is designed for ESP32 microcontroller boards.

Background

This project started as a way to control a Battlebot I was building. Many Battlebots are designed to receive commands from standard flight controllers like those you would use with drones or quadcopters. These controllers communicate with receiver modules using one of many different RF protocols. The receivers often produce a PWM output in response to the commands sent by the controllers, usually as input to an Electronic Speed Controller (ESC).

I didn't have a flight controller, but I did have lots of ESP32 boards laying around and a PlayStation 5 controller. So I decided to make this thing, which replaces the conventional receiver with a microcontroller with Bluetooth running Arduino, and replaces the flight controller with a standard Bluetooth gamepad.

Features

Progress is being tracked in todo.md; for now here is a list of completed features:

Documentation

Documentation for all the features of bbrx, including how they inter-relate and how to configure everything, is provided in the docs directory in the root of this repository. These docs explain each feature in detail, and aim to provide a complete picture of how all the parts of bbrx operate.

Default Controls

As mentioned above, bbrx supports dynamic binding of receiver actions to gamepad events. This allows users to set up their own control schemes specific to their devices. Bindings can be loaded from an SD card or from flash memory, but in the case where neither of these have a valid config file, bbrx includes a "default" mapping which should cover most applications. Please take note that bbrx uses the Xbox gamepad layout. The default bindings are as follows:

Gamepad Input Action
Left Stick X axis Servo Channel 1
Left Stick Y axis Servo Channel 2
Throttle (on L2) Servo Channel 3 (forwards)
Brake (on R2) Servo Channel 3 (backwards)
A (xbox) Brake (kills all motors)
B (xbox), D-pad up Max speed up
X (xbox), D-pad down Max speed down

Credits

bbrx is built on top of a number of other open source projects!