# Nexus Game Controller A game controller using a Seeed Studio XIAO nRF52840 Sense board that emulates a Bluetooth keyboard. ## Hardware - 1 pcs [Seeed Studio XIAO nRF52840 Sense](https://www.seeedstudio.com/Seeed-XIAO-BLE-Sense-nRF52840-p-5253.html) ![XIAO nRF52840 Sense](XIAO_nRF52840_Sense.png) ![XIAO nRF52840 Sense Rear](XIAO_nRF52840_Sense_Rear.png) - 1 pcs [Battery Small](https://techfun.sk/produkt/li-pol-bateria-mala-rozne-typy-do-1000mah/) ![Battery Small](Battery_small.png) - 6 pcs [Push Buttons](https://rpishop.cz/komponenty/6128-pimoroni-cerne-arkadove-tlacitko.html) connected to pins D1-D6. ![Push Buttons](Push_buttons.png) - 3 pcs [Push Buttons](https://techfun.sk/produkt/tlacidlo-pbs-110-momentove-normalne-otvorene/) connected to pins D8-D10. ![Push Buttons](Push_buttons_long.png) - 3 pcs [cables with Jack 3,5mm mono](https://www.kabel.sk/kabel-3-5mm-mono-m-m-1-5m-cierny-p21091) ![Cable_with_jack](Cable_with_jack.png) - 6 pcs [Panel Mounting 3.5mm Mono Jack Socket](https://www.rapidonline.com/bkl-72314-panel-mounting-3-5mm-mono-jack-socket-with-switch-50-1508) ![Panel Mounting 3.5mm Mono Jack Socket](Mono_Jack_Socket.png) - 1 pcs [Power Switch](https://techfun.sk/produkt/jednoduchy-prepinac/) ![Power Switch](Power_Switch.png) ## Features - **Bluetooth LE Keyboard:** Connects to any computer or mobile device as a standard keyboard. - **Multi-Event Buttons:** Each of the 9 buttons supports three types of interactions: - Single Click - Double Click - Long Press - **Character Mapping:** Each button event sends a unique character. - **Serial Debugging:** Outputs button events and Bluetooth connection status to the serial monitor. ## Button Mappings | Button | Single Click | Double Click | Long Press | |--------|--------------|--------------|------------| | D1 | `a` | `b` | `c` | | D2 | `d` | `e` | `f` | | D3 | `g` | `h` | `i` | | D4 | `j` | `k` | `l` | | D5 | `m` | `n` | `o` | | D6 | `p` | `q` | `r` | | D8 | `s` | `t` | `u` | | D9 | `v` | `w` | `x` | | D10 | `y` | `z` | `1` | ## How to Use 1. **Setup Arduino IDE:** - Install the "Seeed nRF52 Boards" package. - Select "Seeed XIAO BLE Sense - nRF52840" as the board. - Install the "Adafruit Bluefruit nRF52" library. 2. **Upload:** Compile and upload the [sketch](sketch.ino) to your XIAO board. 3. **Connect:** Scan for Bluetooth devices on your computer or mobile device and connect to "Nexus Game Controller". 4. **Play:** Press the buttons to send keystrokes. Open the Serial Monitor at 115200 baud to see debug information. ## 3D Print ![Hexagon](Krabicka_hexagon.png) You can import the [3mf file](Krabicka_hexagon.3mf) to your slicer for printing. ## Customize your design Open the [3D model](Krabicka_hexagon.FCStd) in FreeCAD to model your changes. ## Final Product ![Hexagon](Krabicka_hexagon_final.gif)