Using ping and ir at the same time
tronsnavy
Posts: 70
All,
·
Greetings from VA Beach.· Hope everyone is well.· Got a question.· My BOE is doing great with PING.· He is going around, finding walls and such, but he doesn't see "clothes" very·well.· ·I am trying to get both·PING and 2 X IR sensors to work at the same time.· I am using a propeller.· Does anyone have a suggestion? Thanks and have a great weekend.
·
Bob
·
Freedom is worth fighting for; it will ensure posterity experiences the same. [noparse][[/noparse]Theron Hudson]
·
Greetings from VA Beach.· Hope everyone is well.· Got a question.· My BOE is doing great with PING.· He is going around, finding walls and such, but he doesn't see "clothes" very·well.· ·I am trying to get both·PING and 2 X IR sensors to work at the same time.· I am using a propeller.· Does anyone have a suggestion? Thanks and have a great weekend.
·
Bob
·
Freedom is worth fighting for; it will ensure posterity experiences the same. [noparse][[/noparse]Theron Hudson]
Comments
Show us the code that you are using thus far and a schematic if you are able. Since PING and IR do not interfere with one another it is completely possible to have multiple forms of object detection.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
·
Thanks for helping.· I attached two spin files to this post.· The first is "My6thTest5.spin".· You may recognize it, as I downloaded it (and then modified it), from the ROBOT MAG website (www.botmag.com); Spring 2008 issue.· The schematic (modified for my BOT) is located at the top of this file.· I would like to give credit to the author, but none of the files contained a name.· Anyway, the second file is "TestIrDutyDistanceDetector.spin".· This one may also be familiar.· It's the file on page 152 of the "PEK Fundamentals" book.· This file, I also modified and contains the code that launches the IR process into cogs.· I know that I didn't comment very well as time seems to be a precious commodity.
·
As I indicated in my previous e-mail, BOE works great with ping... in fact, if you "comment-out" all references to IR in the first spin file, BOE works fine with ping.· I·know·the problem has to do with using the counter modules·and·launching the IR process into a cog.· If your·like me,·you find little time to devote to "outside the family (and work)" projects.···Thanks for anything that anyone can provide.· Have a good one.
·
Bob
Please use the "File->Archive->Project..." to include all of your object components.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
·
Here is the zipped file (with all objects).· I will have some time this weekend to work this as well.· But I'm sure that someone with more experience would get to a solution faster.· Thanks again for helping out.· Have a good one.
·
Bob
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I finally had a chance to look over your suggestion last night.· The file on page 152 includes a repeat loop at the end of the file, that I forgot to include(I feel pretty stupid).· Anyway, I added the repeat command for applicable lines of code.· Still did not work, but I have had a bad felling about the way I used COGNEW.· I ended up calling two objects (one for left IR and one for right IR), and made a few more modifications.· Presto... boe works with IR (with ping disabled). I will get all working this weekend.· Thanks for the help.· Hope you have a great weekend.
Bob