View Full Version : XBee serial communication, emergency stop signal to robot

05-16-2011, 06:50 AM
I have an arduino robot doing some mapping stuff.... It has an xbee shield on it via which it sends sensor data to a PC serially (the XBee radios are in AT mode). In the PC's user interface, there are two buttons viz., START and STOP which obviously send signals to the robot to start and stop respectively. the START I can implement easily(waiting for the signal in a while loop). But the STOP requires the use of an interrupt. How can I make a particular signal to trigger the robot's stopping mechanism?

While most of the communication is from robot to PC, only in these two situations the communication is from PC to robot.

05-16-2011, 08:40 PM
use another condition inside the infinite loop and and wen u send a stop to the robot change the value of the variable that is implementing the condition..... so the code inside the condition would not be implemented .... thats the simplest way i can think of....

05-16-2011, 08:49 PM
which means i will have to continuously check for an incloming signal?

also is there anyway to recieve serial data without any loss while in an ISR? somethin like dis.....

void setup()
attachInterrupt(1,isr,CHANGE); //RX pin is connected to digital pin 3

void loop()


void isr()
char c;

05-16-2011, 11:08 PM
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1191505972 see the code on this page this is wat im talking about.....

01-12-2016, 06:18 PM
Hi Guys,
Here is a orginal xbee shield for serial communication is robot to PC. Basically zigbee or xbee shield (https://www.robomart.com/xbee-or-zigbee-wireless-communication-module-wire-antenna) is used for communicate one to another person.