Laser Tag System
Team Name: Laser Tag
Team Members: Daniel Dakev, Omar Ahmed
Description
These are instructions for building a fully featured laser tag system that can be used for games with up to 10 people at the same time. The project describes how to connect all the components on two guns and program them, and how to program the server running on a Raspberry Pi. Up to 10 guns can be added following the examples below.
Parts List
- 2x LPC1764 Mbed https://os.mbed.com/platforms/mbed-LPC1768/
- 3x Xbee Series 1 https://www.sparkfun.com/products/retired/8665
- 2x Miniature LCD Module https://www.sparkfun.com/products/11377
- 2x MMA8452 Triple-Axis Accelerometer https://www.sparkfun.com/products/13926
- 2x Infrared Transmitter Module https://www.sparkfun.com/products/retired/10732
- 2x Infrared Receiver Module https://www.sparkfun.com/products/retired/8554
- 2x USB Mini-B Breakout https://www.sparkfun.com/products/9966
- 2x Speaker https://www.sparkfun.com/products/11089
- 2x Vibration motor https://www.sparkfun.com/products/8449
- 2x Green and 2x Red LEDs
- 2x Pushbuttons
- 4x 2N3904 BJT Transistors https://www.sparkfun.com/products/521
- 8x 300 Ohm Resistors
- 2x Powerpack (optional)
- 1x Raspberry Pi 3 B https://www.adafruit.com/product/3775?src=raspberrypi
Wiring
Xbee (Raspberry Pi)
Xbee (mbed)
Mbed | Xbee |
---|---|
Vout | VCC |
p14 | DOUT |
p13 | DIN |
p15 | RST |
GND | GND |
uLCD
Mbed | uLCD Header | uLCD Cable |
---|---|---|
VU | 5V | 5V |
Gnd | Gnd | Gnd |
TX=p9 | RX | TX |
RX=p10 | TX | RX |
p11 | Reset | Reset |
Accelerometer
Mbed | MMA8452 |
---|---|
Vout | 3.3V |
p6 | SDA |
p7 | SCL |
Gnd | Gnd |
Note: there aren't enough inputs on the mbed to fit all the serial and I2C devices, so the accelerometer is placed on digital pins and I2C behavior is simulated in software
IR Transmitter
Mbed | IR Transmitter |
---|---|
VU | VCC |
p21 | CTL |
TX=p28 | GND |
IR Receiver
Mbed | IR Receiver |
---|---|
VU | VCC |
RX=p27 | OUT |
GND | GND |
USB Breakout
Note: The USB Mini-B breakout is used only to provide power to the board using an external powerpack.
Mbed | USB Breakout |
---|---|
Vin, VU | VCC |
GND | GND |
Speaker
Vibration Motor
Green LED
Connect a 300 Ohm resistor in series and connect from p22 to GND.
Red LED
Connect a 300 Ohm resistor in series and connect from p23 to GND.
Pushbutton
Connect from p12 to GND.
Setting up Xbees
To set up the Xbees to communicate with each other, each Xbee has to be configured first. This can be done on the raspberry pi using minicom. One of the Xbees that will be connected to the raspberry pi needs to be configured as coordinator and the other Xbees that are connected to the Mbeds are configured as routers.
Coordinator setup
+++ ATRE ATMY 0 ATDL FFFF ATCH 11
Router setup
+++ ATRE ATMY FFFE ATDL 0 ATCH 11
Code
Mbed guns
Import programlaser-tag
Laser tag guns code https://os.mbed.com/users/ddakev/notebook/laser-tag-system/
Raspberry Pi
Please log in to post comments.