XBee Chat Server
Overview
This is a one way chat server where we utilize two MBEDs, one for transmitting a message and the other MBED is receiving the message. Both MBEDs have independent uLCDs to display the message the user writes and to display the message received. XBees were used to create wireless serial communication at 2.4 GHz. The transmitting MBED has a keyboard input via USB and the user types in a message he/she wants to send to the receiving MBED. As the user types the message is displayed on the uLCD character by character including backspace. Once the user is ready to send the message, the user presses the enter key and the message is sent. The receiving MBED polls every 50 milliseconds to check if the XBee has any data in the buffer. Once data is detected in the Xbee, it is read in and displayed on its uLCD. Every message begins with Got new message: to indicate a new message received.
Circuit Schematic
Transmitting End
p19 is connected to Vcc (3.3V) to distinguish that it is the transmitting end.
XBee Module
XBee | MBED |
---|---|
Vcc | Vout (3.3V) |
Dout | p11 |
Din | p10 |
Gnd | Gnd |
RST | p20 |
uLCD Module
MBED | uLCD Header | uLCD cable |
---|---|---|
5V=VU | 5V | 5V |
Gnd | Gnd | Gnd |
TX=p13 | RX | TX |
RX=p14 | TX | RX |
p15 | Reset | Reset |
USB Module
USB | MBED |
---|---|
Vcc | Vout (3.3V) |
D+ | USB D+ |
D- | USB D- |
Gnd | Gnd |
Connect 15kΩ resistors from D+ and D- to Ground. (PullDown)
Receiving End
p19 is connected to Gnd to distinguish that it is the receiving end.
XBee Module
XBee | MBED |
---|---|
Vcc | Vout (3.3V) |
Dout | p11 |
Din | p10 |
Gnd | Gnd |
RST | p20 |
uLCD Module
MBED | uLCD Header | uLCD cable |
---|---|---|
5V=VU | 5V | 5V |
Gnd | Gnd | Gnd |
TX=p13 | RX | TX |
RX=p14 | TX | RX |
p15 | Reset | Reset |
Code
Import programXBee_Chat_Server
ECE 4180 Mini-Project (Lab 4)
Setup
Video Demo
Please log in to post comments.