Shop OBEX P1 Docs P2 Docs Learn Events
IR test with the boe bot — Parallax Forums

IR test with the boe bot

Jayguy5000Jayguy5000 Posts: 139
edited 2006-07-24 17:20 in BASIC Stamp
I am working on the projects included in the book that came along with my boe bot. when I use the code and correct circuitry on a single boe bot to test the ir pair it works fine! i see in the debug display the 0 switch to a 1 and back as I move my hand infront of it. Now I would like to add a second boe bot to this scene. I would like one boe bot to transmit IR and one to detect it, easy enough right? the only success I have had is when watching the debug terminal the 1 switched to a 0 only once ( or vise versa) but anyway it only detected it one or two times and that was all. so what do I have to do for this to work? where can I find information and actually transmitting IR with the basic stamp. I have looked in the IR book provided by parallax but that doesn't address transmiting with the bs2 only with a sony remote. thanks for all the help!
~Jeremy

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-21 15:09
    Jayguy5000-

    Before we proceed with troubleshooting what you feel may be a problem, can you tell us, in simple terms, what it is that you're trying to accomplish? Please break your response into paragraphs, so it can be more easily read. The easirier it is to read, the sooner you'll probably get an answer.

    Are you trying to implement serial communication between the two 'bots using I/R?

    Are you trying to send I/R "commands" from one 'bot to another?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Jayguy5000Jayguy5000 Posts: 139
    edited 2006-07-21 16:24
    ahh yes, I am trying to altimatly have a basic stamp send IR to another basic stamp to interpret the ir into commands. I would also like to be able to make a IR controlled video game controller.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-21 16:45
    Jayguy5000-

    Slowly but surely, we're getting to your ultimate goal. You said:

    "interpret the ir into commands".

    Did you mean to imply that the first 'bot would be sending I/R controller-like commands to the second receiveing 'bot, and the receiving 'bot is to interpret them as though they'd come from an ordinary I/R remote control?

    If so, before we get to your ultimate goal, how are you going to ascertain whether they're in proper alignment so that the receiver can SEE what the sender is sending? Remember, unlike RF ("radio wireless") I/R is strictly LINE OF SIGHT!

    Sorry if I burst your balloon prematurely smile.gif

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-07-21 17:00
    yes but simply put he could make the bots roam autonomounously until line of site is established, once established stop and see what one another is saying and continue forward until the next time they make contact
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-21 18:54
    Will -

    You'll have to put it more simply than that for me. How were you intending to KNOW that the near-DIRECT line of sight was indeed established - hit and miss? If so, that might take DAYS!

    Unless you have (say) a compass or GPS onboard, and can establish that one 'bot is facing (say) North, and the other 'bot is (say) facing South, you have no orientation basis. Let's take a DOABLE scenario.

    Two 'bots establish that they are in near proximity to one another. They do this by the use of a (known) sequenced 360 degree visible or I/R beacon. The same thing could be done even easier with audible or ultrasonic sound with a known sequence. When they were originaly built one was designated "master" and the other designated "slave".

    The "master" now transmits a second audible or visual cue to the "slave" which says "DANCE". Once the "slave" gets the "DANCE" command he is to make three sequences, exactly as follows:

    1) Transmit the I/R beam to the "master".

    2) "Listen" for nn seconds for a response.

    3) If there IS a positive response, I/R communication may begin. End of process.

    4) If he gets no response from the "master" he rotates himself 90 degrees to the right, and repeats with Step 1.

    5) If after 3 turns of the "slave" there has been no communications established, the "master" makes ONE 90 degree turn to the right, and the sequence repeats with Step 1.

    6) If the "master" has made 3 turns and communications has not been established, they both agree audibly to head for the local tavern to grab a cold one! smile.gif

    As you can see, it's not quite as easy as it seems. Why is it so EASY for a HUMAN? He/she points the remote right at the 'bot's I/R reciever, since he/she KNOWS where to point it. The humans knows and see the 'bot's orientation, and his own - an advantage two 'bots do not innately have.

    (Note: Not all I/R setups are as directionally sensitive as I have portrayed here. However, best and most reliable I/R communication will be had with direct line of sight.)

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->

    Post Edited (Bruce Bates) : 7/21/2006 6:57:47 PM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-07-22 04:32
    well im determining that the area they will be roaming is fairly small, say 20 ft by 20 ft or somthing of the such, if you were intending on a bigger area you definantly will have to use a better way, if you still wanted to use just the IR you could everyonce in a while randomly make them do a "Spin" check like in sumobot and check if anything is around and try to send a data communcation signal to it, if it responds then it was right. brain storm! you can figure that out i would if i had another boebot
  • Jayguy5000Jayguy5000 Posts: 139
    edited 2006-07-24 13:29
    really I would just like to know how to use the bs2 to send out IR commands, such as for the wireless video game controller i mentioned. after I can learn the basics of transmitting Ir I will be done with asking questions and move onto doing more experiments <[noparse]:)[/noparse] Is it possible to send out a string of Ir like this? I have done the projects in the book parallax provides on IR and I understand that there are some output transmitions smaller than 1ms, such as 600 uS which the bs2 cannot do anything smaller than 1ms. since this is the case I can make all of my commands 1ms and larger, becuase I do not have to follow the sony protocol becuase I also make the receiver from whatever I want and program that as well. all help is much loved.
    ~Jer
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-24 15:58
    Jay -

    Here is the problem you face. Not all I/R controlled devices "speak the same language" (use the same I/R encoding). So without knowing the encoding scheme that's presently being sent, you can't very well program any microcontroller to "speak" to it. Once you know what it is, then you have a chance of getting somewhere.

    Later, you say you want to do your own encoding and decoding. Additionally, you will have to interface the encoded data to the device in question. May I suggest that's a bit of an ambitious project, particularly if you're new to microcontollers.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2006-07-24 17:20
    Jeremy said...
    where can I find information and actually transmitting IR with the basic stamp. I have looked in the IR book provided by parallax but that doesn't address transmiting with the bs2 only with a sony remote. thanks for all the help!
    ~Jeremy
    Hello Jeremy,

    The book IR Remote for the Boe-Bot has recently been revised, and the new version will be posted to the Parallax website shortly.· Andy added a 10 page Appendix C to this version, titled: "Transmitting IR Remote Signals with the BASIC Stamp 2."· I have attached a pdf of this appendix;·the .bs2 files for·it are already posted for download under the link "IR Remote Book Source Code (.zip)" on this page:

    http://www.parallax.com/detail.asp?product_id=70016

    I·hope you find this useful,

    Stephanie Lindsay
Sign In or Register to comment.