Remote Mobile Robot with XBee-WiFi (Android)

Remote Mobile Robot with XBee-WiFi (Android)

By combining these two tutorial (1) Remote Mobile Robot with XBee-WiFi and (2) Xbee WiFi in Soft AP Mode, we can have a Remote Mobile Robot with XBee-WiFi (Android).

MC40A Xbee WiFi

HARDWARE
1. MC40A (link).
2. UIC00B – Programmer (link).
3. SPG10-150K (link).
4. Motor Bracket (link).
5. Castor (link).
6. Battery (link).
7. Xbee WiFi (link).
8. Xbee Starter Kit Without Module (link).
9. USB Mini Cable (link).

ANDROID APPS
WiFly Remote is a very suitable app for this application, plus they have shared the Android code too! However, We are not explaining the Android code here. We just show how to use it with our stuff. First, we need to know what is data sent by this apps, and we already share this, refer to XBee WiFi in Soft AP Mode.

WiFly Remote 2

Data from the WiFly Remote apps.

xctu13

Description (update 7 May 2015):
F80; => Forward arrow button is touched
B80; => Backward arrow button is touched
R80; => Right arrow button is touched
L80; => Left arrow button is touched
S0; => No button is touched

PIC PROGRAMMING HIGHLIGHT
From the data above, we can decide to move the robot to which direction.

inByte = uartReceive();
if(inByte == 'F') // Forward
{ // Read dummy byte
uartReceive(); // 8
uartReceive(); // 0
uartReceive(); // ;
motor(80, 80); // Robot move forward
}
else if(inByte == 'B') // Backward
{ // Read dummy byte
uartReceive(); // 8
uartReceive(); // 0
uartReceive(); //
motor(-80, -80); // Robot move backward
}
else if(inByte == 'R') // Right
{// Read dummy byte
uartReceive(); // 8
uartReceive(); // 0
uartReceive(); //
motor(80, -80); // Robot turn right
}
else if(inByte == 'L') // Left
{// Read dummy byte
uartReceive(); // 8
uartReceive(); // 0
uartReceive(); //
motor(-80, 80); // Robot turn left
}
else if(inByte == 'S') // Stop
{// Read dummy byte
uartReceive(); // 0
uartReceive(); //
motor(0, 0); // Robot stop
}

Remote Mobile Robot with XBee-WiFi (Android) source code (download).

VIDEO

BUY

 

 

 

 

Related Products

USB ICSP PIC Programmer

Không có sẵn

x 1 đơn vị



Chat hỗ trợ
Chat ngay