🌟 About the Project
The codes are dedicated to the wireless controller using XIAO nRF52840. By utilizing a joystick module and the internal LSM6DS3 sensor, we send HID commands to the receiver board, allowing us to control the mouse on a target computer.
Wireless Connectivity: As we intended to create a wireless controller from the outset, we turn to the nRF52840 board’s built-in Bluetooth capabilities to address the communication aspect. By utilizing two XIAO boards, we establish a seamless data exchange between them, ensuring a wireless experience.
HID Capabilities: Fortuitously, the XIAO nRF52840 board possesses HID capabilities similar to the Arduino Micro board. This means we can directly control the mouse and keyboard by commanding the microcontroller, expanding the controller’s functionality.
Powering the Controller: We power the board using a lithium battery. By implementing connectors, we can easily connect or disconnect the battery as needed, ensuring flexibility and portability.
- • Control mouse via joystick module
- • Control mouse via internal LSM6DS3 (roll, pitch, yaw)
- • 2 extra buttons for sending commands
- • light indicator using Neopixel ws2812b
🧰 Getting Started
In this project, I decided to use the Seeed Studio XIAO nRF52840 board. Because a lot of the features I need are built into this board, for example, Bluetooth and gyroscope.
- • XIAO nRF52840 Sense
- • XIAO nRF52840
- • joystick module
- • NeoPixel ws2812b
- • Microswitch
Make the connections according to the table and schematic below. We establish connections according to the provided table and schematic. For example, we connect the XIAO nRF52840 to the joystick module by linking A0 to VRX, A1 to VRY, 4 to SW, 5V to +5V, and GND to GND. The Neopixel Din connects to pin 3 of the XIAO nRF52840, and the two additional microswitches connect to pins 5 and 6.
- • Complete Schematic
If you’re interested in building this project on your own, the code is available on GitHub. Simply go to the GitHub repository, and download the code.
GitHub repository: github.com/cifertech/XIAO-Controller
After the upload process, we gain the ability to control the mouse using the joystick. Additionally, we can manipulate the mouse through hand movements, thanks to the integrated gyroscope functionality.
With the Seeed Studio XIAO nRF52840 board and our DIY approach, we have successfully crafted a Bluetooth controller that offers enhanced features and customization options. By leveraging the joystick module, micro switches, and Neopixels, we’ve created a unique and eye-catching controller that stands out from the crowd. Embrace the world of wireless control and explore the possibilities of this innovative project.