IR test with the boe bot
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
~Jeremy
Comments
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 -->
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
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
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!
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
~Jer
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 -->
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