Pairing Your PS3 Controllers
Please download and use the AstroCan/AstroComms ShadowMD version: https://github.com/PrintedDroid/ShadowMD-AstroCan-AstroComms
There’s always the current version
Pairing your controllers to the system has never been easier. The new standalone version includes a Serial CLI — no more copying MAC addresses or editing code. Just type pair, plug in your controllers, done.
Bluetooth Dongle Requirements
This sketch requires a CSR8510-based Bluetooth USB dongle. The bundled USB Host Shield Library only supports CSR chipsets for wireless PS3 controller connections.
Confirmed compatible:
| Dongle | Max Controllers | Status |
|---|---|---|
| LogiLink BT0015 (BT 4.0) | 2 simultaneous | Recommended |
| UGREEN CM748 (BT 5.3) | 2 simultaneous | Confirmed working |
| Asus USB-BT500 (BT 5.0) | 2 simultaneous | Recommended |
| LogiLink BT0048 (BT 4.0) | 2 simultaneous | Confirmed working |
| CSL Bluetooth 4.0 (Amazon B01N0368AY) | 2 simultaneous | Confirmed working |
| UGREEN USB Bluetooth 4.0 | 2 simultaneous | Recommended |
| Sandberg Nano Bluetooth 4.0 | 2 simultaneous | Confirmed working |
| Pearl BT 4.0 Class 1 (EDR+CSR) | 2 simultaneous | Confirmed working |
| APLIC ZSB BT Nano Stick v4.0 (302352) | 2 simultaneous | Confirmed working |
| Gembird BTD-Mini (BT 4.0) | 1 only | Works, but no dual controller |
| Any generic “CSR8510 BT 4.0” dongle | 1–2 simultaneous | Should work |
NOT compatible:
- TP-Link UB400 — V1 uses CSR8510 (works), but V2 uses Realtek RTL8761B (does NOT work). Since you can’t tell which version you’ll get, avoid this dongle entirely.
- LogiLink BT0058 (Realtek RTL8761B, BT 5.0) — does NOT work
- Any Realtek-based dongle — not compatible with the USB Host Shield Library
Rule of thumb: If it says “Bluetooth 5.0” on the package and costs less than 15 EUR, it’s almost certainly Realtek-based and won’t work. Look for “Bluetooth 4.0” or check that it uses a CSR8510 chip. Exception: The Asus USB-BT500 (BT 5.0) is confirmed working.
Arduino IDE
- Arduino IDE 1.8.19 — tested, works
- Arduino IDE 2.x — tested, works
This is a standalone version — the USB Host Shield Library is bundled in the src/ folder with all necessary modifications already applied. No external library installation required. Just open and upload.
Pairing Process (New Serial CLI Method)
The new version stores controller MAC addresses in EEPROM via a simple Serial CLI. No more editing code, no more copying MAC addresses. Paired controllers survive reboots and re-uploads.
1. Connect the USB Bluetooth Dongle to the USB Host Shield.
2. Connect the Arduino to your computer via USB.
3. Open the sketch in Arduino IDE, select your board (Arduino Mega 2560) and COM port, then upload.
4. Open the Serial Monitor (Ctrl+Shift+M) and set the baud rate to 115200.
5. After initialization, you should see:
Bluetooth Dongle Initialized
HCI Reset complete
Dongle Address: XX:XX:XX:XX:XX:XX
Waiting for controller...
6. Type pair and press Enter. The system enters pairing mode:
>> PAIRING MODE started
>> Waiting for [Foot Primary]...
>> Plug controller via USB or power on via Bluetooth
7. Unplug the Bluetooth dongle from the USB Host Shield.
8. Plug in your first PS3 Navigation Controller (the one you want for foot drive) via mini-USB cable. This is a hot swap while the board is powered on.
9. The system automatically reads the controller’s MAC address and stores it in EEPROM:
>> Paired [Foot Primary]: 00:07:04:BA:C9:56
>> Waiting for [Dome Primary]...
10. Unplug the first controller. Plug in the second controller (for dome rotation):
>> Paired [Dome Primary]: 00:06:F7:3B:52:99
>> Waiting for [Foot Spare]...
11. If you don’t have spare controllers, type done and press Enter to exit pairing mode. Otherwise, continue plugging in spare controllers.
12. Unplug the controller and plug the Bluetooth dongle back in.
13. Turn on both controllers by pressing the PS button. After about 5 seconds, each controller’s LED should turn solid (not blinking). The Serial Monitor shows:
Waiting for controller...
Connected: 00:07:04:BA:C9:56
[FOOT onInit] enter MAC=00:07:04:BA:C9:56
[LOOP] Sending Foot LED... OK
Connected: 00:06:F7:3B:52:99
[DOME onInit] enter MAC=00:06:F7:3B:52:99
[LOOP] Sending Dome LED... OK
That’s it! The MAC addresses are stored permanently in EEPROM. They survive power cycles, resets, and even re-uploading the sketch.
To turn off a controller: Hold the PS button for 15 seconds, or press PS + L3.
Serial CLI Commands
You can manage your controllers at any time via the Serial Monitor (115200 Baud):
| Command | Description |
|---|---|
pair | Enter pairing mode (Foot → Dome → Foot Spare → Dome Spare) |
done | Exit pairing mode early |
status | Show stored MAC addresses and connection status |
clear | Clear all stored MACs from EEPROM (factory reset) |
debug | Toggle verbose Bluetooth debug output on/off |
reboot | Software reset |
help | Show available commands |
Troubleshooting
Controller blinks but doesn’t connect:
- Make sure you’re using a compatible BT dongle (see list above)
- Try
clearthenpairto re-pair from scratch - Power-cycle the Arduino completely (unplug USB power, not just the reset button)
Second controller takes a long time to connect:
- This is normal — the second controller may need more time than the first one
- If it only blinks and doesn’t connect, briefly press the PS button on the controller
- If it still doesn’t connect, turn the controller off and back on, then try pairing again
Only one controller connects:
- Your dongle may only support 1 simultaneous connection (e.g. Gembird BTD-Mini)
- Use a BT0015 (LogiLink), UGREEN CM748, or Asus USB-BT500 — confirmed to support 2 controllers
Motors don’t respond:
- Check motor controller wiring and settings
- For Sabertooth: DIP switches 1 & 2 Down, all others Up
- Type
statusto verify controllers are connected
Legacy Pairing (Old Method)
The old method (manually entering MAC addresses in the code) is no longer needed. If you’re still using an older sketch version without Serial CLI, you can find the instructions in the following video:
Pairing the PS move controller needed for Shadow MD, Shadow & Astrocomms with the software can be a bit tricky, but there is this fantastic video on youtube:
Pairing process:
Bluetooth Dongle Requirements
This sketch requires a CSR8510-based Bluetooth 4.0 USB dongle. The USB Host Shield 2.0 library only supports CSR chipsets for wireless PS3 controller connections. Bluetooth 5.0 dongles (almost all use Realtek RTL8761B) are not compatible.
Confirmed Working
- LogiLink BT0015 (CSR8510, BT 4.0)
- LogiLink BT0048 (CSR8510, BT 4.0)
- CSL Bluetooth 4.0 USB Adapter (Amazon B01N0368AY)
- UGREEN USB Bluetooth 4.0 Adapter
- Sandberg Nano Bluetooth 4.0 Dongle
- Any generic “CSR8510 Bluetooth 4.0” dongle
NOT Compatible
- TP-Link UB400 (V2.x uses Realtek RTL8761B)
- LogiLink BT0058 (Realtek RTL8761B, BT 5.0)
- Any Bluetooth 5.0 dongle (nearly all use Realtek)
Arduino IDE
Use Arduino IDE 1.8.19. Arduino IDE 2.x has aggressive library caching that prevents changes to library source files (like BTD.cpp) from being recompiled. This causes USB pairing to silently fail.
1.) Connect the USB Bluetooth Dongle to the USB Host Shield
2.) Connect the Arduino to your computer
3.) Optional (but recommended): Enable serial debugging. Change ENABLE_UHS_DEBUGGING to 1 in settings.h
- define ENABLE_UHS_DEBUGGING 1
4.) Upload the SHADOW (MD) Sketch to your Arduino board
(Don’t forget to select your board type and correct Com Port)
5.) Open your Serial Monitor (Ctrl+Shift+M), and set your baud rate to 115200.
6.) After initialization, if Debugging is enabled, the Serial Monitor should display the following:
PS3 Bluetooth Library Started Bluetooth Dongle Inititialized HCI Reset complete Local Bluetooth Address: ##:##:##:##:##:## Wait For Incoming Connection Request
7.) Unplug the Bluetooth Dongle and connect your PS3 Controller via mini-USB cable.
(This is a HOT SWAP, while the board is ON)
8.) Look for the following on the Serial Monitor:
Navigation Controller Enabled BT Address of Last connected Device when Primary Connected: ##:##:##:##:##:## We have a controller connected, but it is not designated as primary. Waiting for PS3 Controller Data Wait For Incoming Connection Request Navigation Controller Connected Bluetooth Address was set to: ##:##:##:##:##:##
9.) Copy the BT Address of the controller, and paste it into the sketch here:
String PS3MoveNavigatonPrimaryMAC = "##:##:##:##:##:##";
Upload the updated sketch to the Arduino.
10.) Unplug your PS3 Controller and reconnect the Bluetooth Dongle. You should see:
Bluetooth Dongle Initialized HCI Reset complete Write class of device Local Bluetooth Address: ##:##:##:##:##:##" Wait For Incoming Connection Request
11.) Press “PS” Button to turn on the Controller. It should take about 5 sec The LED on your controller should turn solid red You should see the following in your Serial Monitor window:
Navigation Controller Enabled BT Address of Last connected Device when Primary Connected: ##:##:##:##:##:## We have our primary controller connected. Waiting for PS3 Controller Data
12.) To turn off your remote, either hold the PS button down for 15 seconds or press the combination: PS + L3
