Shop OBEX P1 Docs P2 Docs Learn Events
RF communication — Parallax Forums

RF communication

kenwtnkenwtn Posts: 250
edited 2008-05-05 21:22 in BASIC Stamp
·
···· I m not sure how to ask this so it makes sense, but will do my best. I m planning on hooking a BS2 to my computer and using a RF transmitter send commands to a robot that has a RF receiver attached. The robot BS2 has a lot of processing going on and I do not want it to miss a command sent from the computer. The BS2 on the robot could check for a command from the computer about 1 or 2 times a second. So my question is does the RF transmitter wait for some indication that the RF module is ready before transmitting the data or does the RF transmitter just send the information and assume that some receiver is getting the data?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-05 20:28
    The 433MHz transmitter / receiver and the 912MHz transceiver do not wait. If the BS2 is not listening when the PC sends something, it is missed. Buffered devices like the xBee transceivers have flow control. If /RTS is false, the data is held in the xBee until the BS2 can read it.
  • kenwtnkenwtn Posts: 250
    edited 2008-05-05 20:31
    Ok, but how do the transmitter and receiver ever get in sync?
  • kenwtnkenwtn Posts: 250
    edited 2008-05-05 20:34
    ·If the BS2 tranmitter re-sends the command over and over and the BS2 receiver when it has time comes up and does a wait. Will that work?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-05 20:34
    If you make the robot the master, it can notify the PC that it's ready to receive a command and the PC can respond pretty quickly with the command which the robot is (at that point) waiting for.
  • kenwtnkenwtn Posts: 250
    edited 2008-05-05 20:36
    So you have to have 2 RF Receivers and 2 Transmitters for this to work?
  • voodoofishvoodoofish Posts: 67
    edited 2008-05-05 21:09
    Ideally, yes, you would have a transceiver(transmitter and receiver) for each end. This way you could make sure that the transmission got through.
    One possible way around it though with just a single transmitter and receiver could be to have a window of time that you know the receiver will be looking for a signal(a listen loop that goes for 10 seconds every 10 seconds). This way your transmission should overlap the receivers window of time. 10 seconds of actions, 10 seconds of waiting for instructions. If nothing is received, continue with what you were doing. if something was received, do that. You could add some sort of id so that it can check to see if it's run the instruction already.
  • kenwtnkenwtn Posts: 250
    edited 2008-05-05 21:22
    That sounds like a good solution for my problem. I will give that a try. Thanks so Much for you help
Sign In or Register to comment.