Results 1 to 5 of 5

Thread: XBee serial communication, emergency stop signal to robot

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2009
    Posts
    3

    Question XBee serial communication, emergency stop signal to robot

    Hi
    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.

  2. #2

    Default

    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....

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2009
    Posts
    3

    Default

    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()
    {
    Serial.begin(57600);
    attachInterrupt(1,isr,CHANGE); //RX pin is connected to digital pin 3
    }

    void loop()
    {

    }

    void isr()
    {
    char c;
    c=Serial.read();
    Serial.println(c);
    }

  4. #4

    Default

    http://www.arduino.cc/cgi-bin/yabb2/...num=1191505972 see the code on this page this is wat im talking about.....

  5. #5
    Junior Member User
    Join Date
    Sep 2015
    Location
    noida
    Posts
    15
    Blog Entries
    1

    Default

    Hi Guys,
    Here is a orginal xbee shield for serial communication is robot to PC. Basically zigbee or xbee shield is used for communicate one to another person.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •