Arduino Fio / XBee based D3VICE control point for Airsoft games
If you have used and enjoy this code base, I'd love to hear from you!
- Download, Install Atom editor
- Download, Install Platformio Atom package
- Restart atom. Open Atom & PlatformIO then import this repo.
??? @TODO once I figure out the process after this
- Install contributed libraries
Sketch > Include Libraries > Manage Libraries
- Adafruit NeoPixel library
- XBee-Arduino library
- Add your user account to tty and dialout groups (May or may not be required for your OS)
sudo usermod -aG tty,dialout <YOUR_USERNAME_HERE>
To connect to the XBee, a SparkFun FTDI Basic Breakout 3.3v is used along with an Adafruit XBee Adapter kit v1.1. As my Adafruit XBee adapter kit v1.1 is discontinued, the replacment seems to be Adafruit's USB XBee Adapter which I haven't tested but should do the trick. A separate FTDI chip isn't necessary with that new model.
XCTU is the program for configuring XBee modules. It is cross-platform.
57600 baudrate
Set the controlpoint as an ZB Router API NOT a ZB Endpoint API! Endpoint will work, but has complications with sleep mode.
XCTU Troubleshootinghttps://www.youtube.com/watch?v=ChCHfJoo9CQ
Make sure if using it on linux, you add yourself to the dialout
group. Example: sudo usermod -a -G dialout chris
Make sure Arduino IDE is closed when working with XCTU. Radio discovery can be finnicky, but it works when it works.
XCTU's download links on Digi's website are usually broken. Find the filename from the download page, then manually browse their ftp server for the correct version of XCTU.
If you can't get XCTU to communicate with your XBee, the rule of thumb is keep trying. It doesn't always work the first or second time. Try the different connection methods as well, from discovery to manually entering XBee serial/USB configuration.
The XBee is very sensitive when it comes to power. It needs as close to 3.3V as possible. When using USB, the Fio gives it a clean 3.285V. 3.296 was acheived using the buck converter regulator and that seemed to do the trick. If you are attempting to remotely program the XBee using X-CTU, and the read process seems slow, it may be that the XBee is crashing when it tries to pull power. Check voltages and try again.
0x73706F6B616E6561 (ASCII spokanea)
SH 0013A200 SL 40B51A26
SH 0013A200 SL 40B774EC
The following people have helped this project in some way, and deserve a mention. Thank you all for helping this project become a reality!
- BulldogLowell for helping me with code when I got stuck
- gfvalvo for helping me with code when I got stuck
- Jiggy-Ninja a.k.a. MarkRD for helping me with code when I got stuck
- Fix phase 3 issue where ttw is ???
- Implement XBee
- Implement debugging via XBee wireless link
- Fix button debounce issue
- Fix endless beep on phase >=1
- Add button hold logic
- Implement ButtonManager
- Try LoRa radio Moteino looks nice.
- (2) 220 Ohm resistor (JP3 button LEDs) DEPRECATED -- The buttons have their own capacitor
- (3) 10K Ohm resistor (x2 JP4 button switches, x1 Battery Voltage Divider)
- (1) 100K Ohm resistor (Battery voltage divider)
- (1) 470 Ohm resistor (R1 Level shifter)
- (1) 100 Ohm resistor (R2 buzzer)
- (1) Arduino Fio
- (1) 900MHz series XBee S2B
- (1) Digi JF1R6-CR3-4I U.FL fem to RPSMA fem cable
- (1) 2.4GHz dipole antenna (@TODO this doesn't seem right)
- (1) 5V Buzzer
- (1) 1000 uF electrolytic capacitor
- (1) TI 74AHCT125 (NeoPixel 3V to 5V level shifter)
- (1) Red Arcade pushbutton
- (1) Blue Arcade pushbutton
- (2) 18650 Cell holder
- (2) 18650 Li-Ion 3.7V battery
- (1) Qunqi MP1584EN DC-DC Buck Converter
- (1) MTM Survivor Dry Box with O-Ring
- (1) Medium keyswitch
- (n) 24 AWG copper wire
- (2) Chasis handles
- (?) 4-40 bolts
- (?) LED Strip Housing
- (2) Arcade Button Quick-Connect Wire Pairs - 0.11"