Proximity Scanning
Robomates uses the CC1101 sub-GHz radio not just for data - it doubles as a proximity sensor. By measuring the strength of a received signal, robots can tell when another robot is physically close. This is the foundation for games like Zombie Tag.
The Idea
Every radio signal gets weaker the further it travels. A signal received at -30 dBm means the transmitter is very close; the same signal at -80 dBm means it's far away. This measurement is called RSSI (Received Signal Strength Indicator), and every CC1101 packet comes with it for free - the radio hardware measures it automatically.
Robomates uses this property to build a simple but effective proximity detection system. Instead of adding extra hardware like IR sensors or ultrasonic modules, the robots reuse the same radio they already have for communication. When a robot wants to know "is anyone near me?", it sends a short burst of scan packets. Any robot that receives those packets with a strong enough signal knows the scanner is physically close.
This approach is intentionally low-tech. It does not give you a precise distance in centimetres - radio signals bounce off surfaces and vary with orientation. But it reliably answers a simpler question: "is this robot within arm's reach?" And that is exactly what game modes like Zombie Tag need.
How It Works
Step by Step
| Step | What Happens |
|---|---|
| 1. Player triggers scan | The player presses R1 or L1 on the controller. The robot enters a 1.5-second scan burst and its body LEDs turn magenta. |
| 2. Scan packets are sent | During the burst, the robot sends a small SCAN packet (11 bytes) every 200 ms over the CC1101 radio. That is about 7-8 packets per burst. |
| 3. Nearby robots listen | All other robots on the same frequency receive these packets. The CC1101 hardware automatically measures the RSSI of each received packet. |
| 4. RSSI check | If the RSSI is ≥ -65 dBm (the threshold), the receiving robot considers itself "scanned" - the scanner is close enough. If the signal is weaker, the packet is ignored. |
| 5. Scan recorded | The scanned robot stores the scanner's crypto ID in a buffer (up to 4 slots). Its eye LEDs flash magenta for 1.5 seconds as visual feedback. |
| 6. Result reported via ping | On the next PING broadcast (every 750 ms), the scanned robot includes the stored crypto IDs. This is how the information leaves the RF network. |
| 7. HQ reads the result | Robomates HQ receives pings over BLE and checks for scan results. The game logic acts on them - for example, in Zombie Tag, a scanned survivor becomes infected. |
Key Parameters
LED Feedback
| Event | LEDs affected | Color | Duration |
|---|---|---|---|
| Scan burst active (scanner) | All 6 body LEDs | Magenta | 1.5 s (burst duration) |
| Scan detected (scanned robot) | Eye LEDs | Magenta | 1.5 s (then restores previous color) |
Why Sub-GHz Radio?
The robots already have Bluetooth (BLE) for connecting to HQ and controllers. Why not use Bluetooth for proximity detection too?
Limitations
RSSI-based proximity is not a precision distance sensor. It works well for the "close or not close" question that games need, but comes with trade-offs worth understanding:
Data Flow
The full path from button press to game event:
[Player presses R1/L1]
-> Scanner sends SCAN packets over CC1101 (1.5 s burst)
-> Nearby robot receives packet, measures RSSI
-> RSSI >= -65 dBm? -> Record scanner's crypto ID in scan buffer
-> Next PING broadcast embeds scan crypto IDs (up to 4)
-> HQ receives PING over BLE
-> Game logic processes scan results (e.g. infection in Zombie Tag)