# The lights controller that no one needs (but might help with custom controller projects)

**URL:** <https://discuss.bluerobotics.com/t/the-lights-controller-that-no-one-needs-but-might-help-with-custom-controller-projects/13825>\
**Category:** Build/Make\
**Tags:** surface-controller\
**Created:** [March 6, 2023, 9:09am UTC](https://discuss.bluerobotics.com/t/the-lights-controller-that-no-one-needs-but-might-help-with-custom-controller-projects/13825 "2023-03-06T09:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwa-gwa](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/gwa-gwa/32/1204_2.png) [@gwa-gwa](https://discuss.bluerobotics.com/u/gwa-gwa)\
**Post date:** [March 6, 2023, 9:09am UTC](https://discuss.bluerobotics.com/t/the-lights-controller-that-no-one-needs-but-might-help-with-custom-controller-projects/13825/1 "2023-03-06T09:09:56Z")

</div>

Let me start off by saying that I am fully aware that there are other solutions to this problem that do not involve making a custom joystick, but I wanted to make a custom joystick so here we are.

This project is going to be of limited use to most people in it’s current form as it is designed for a very specific use case. That said it may be a useful starting point for somone wanting to create their own custom controller.

 ![IMG_9929](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/a/a671f43a402806489640da026fd295fcde5db642.jpeg)

**Materials:**

- Arduino Pro Micro ([here](https://www.banggood.com/custlink/3DKJqI5UFn))
- Silicone Wire ([here](https://www.banggood.com/custlink/3vmCMSPMiF))
- Two Momentary Buttons
- Enclosure
- USB Cable

**Prerequisites:**

- PlatformIO running in VSCode ([here](https://docs.platformio.org/en/latest/integration/ide/vscode.html#ide-vscode))
- The code from github ([here](https://github.com/chrisfraser/custom-lights-controller))
- A soldering iron

**Electrical connections:**  
I am going to paint you a word picture here because I didn’t take a picture before I added silicone for vibration/strain relief.

- Any GND pin on the arduino is connected to one side of both buttons.
- The other side of Button 1 (Dimmer) is connected to Pin 2.
- The other side of Button 2 (Brighter) is connected to Pin 3.

 ![IMG_9927](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/c/cea098882cacab3c1b7bf7509f24eab5d97fc5a4.jpeg)

**Implementation:**

See the GitHub repo for the code. The implementation here is pretty simple and uses two primary libraries:

- [mheironimus/Joystick](https://registry.platformio.org/libraries/mheironimus/Joystick)
- [nawotech/Button](https://registry.platformio.org/libraries/nawotech/Button)

This results in a QGroundControl compatible controller with two buttons that map to buttons 13 (Dimmer) and 14 (Brighter).

Here is a video of the controller in action:

[![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/2/25eb6c24bff6518aa89b6f2d8c4b1b4d4077c698.jpeg "Custom QGroundControl lights controller") ](https://www.youtube.com/watch?v=A7svvolT54E)

One stumbling block was the controller calibration. I ended up making a long-press key combo to enter calibration mode. Here you can fake a calibration by stepping through fake stick inputs.

[![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/d/d48a5bd65132a5048bb7126237225427f4a30b71.jpeg "Custom QGroundControl lights controller calibration") ](https://www.youtube.com/watch?v=c2NPBkxFMlk)

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [March 6, 2023, 9:18am UTC](https://discuss.bluerobotics.com/t/the-lights-controller-that-no-one-needs-but-might-help-with-custom-controller-projects/13825/2 "2023-03-06T09:18:20Z")

</div>

Hi @gwa-gwa, thanks for sharing! 😃

While you’re probably right that the current form of this likely isn’t directly useful to many people, it does cover some useful concepts and approaches, and might prove inspirational and/or fruitful for others looking to have/create some form of custom controller 🙂
