Shop OBEX P1 Docs P2 Docs Learn Events
Dual sensor schematic problem — Parallax Forums

Dual sensor schematic problem

bisctboybisctboy Posts: 6
edited 2008-08-22 12:05 in Robotics
I am new to electronics, breadboards,·and Boe Bot's but have progressed nicely with the book that came with my Boe Bot. I would like to integrate the IR sensors and the Whiskers that came with the kit. Basically, I would like to combine RoamingWithWiskers.bs2 and FastIrRoaming.bs2. However, due to my "rookie" status, I can't figure out how to wire the breadboard because some of the slots used with the IR sensors in the book·are used for the Whiskers. I know that there are alot of I/O ports and·slots in the breadboard and this should not be a problem, but like I said, I am new to this. Does anyone have a schematic or diagram (I prefer a diagram) that would show me the way?

Thanks,

Comments

  • azmax100azmax100 Posts: 173
    edited 2008-08-22 05:22
    Hi bisctboy,

    I think it's very easy to do. You dont need the schematic for that. What you should do just change the whiskers input pin to any free i/o pin then change the input pin number in your code to the new one. Try that. That's a way you can learn.

    by the way, welcome to the forum.
  • SRLMSRLM Posts: 5,045
    edited 2008-08-22 06:14
    It doesn't really matter where on the breadboard the sensors are, rather that the sensor is set up in the same relative position (This row in the breadboard is ground, this one is P12, etc.) Take a look at most of the commands in the Syntax and Reference Manual, and you'll see that, in general, the first argument is a pin number. A good practice is to name the pin:

    Whisker1 PIN 5
    Whisker2 PIN 7


    Then, whenever you would have put in 5 for a pin argument, you can now put in Whisker1. So if you ever need to change pins, you only need to change one line in the code.
  • bisctboybisctboy Posts: 6
    edited 2008-08-22 12:05
    OK, I will give it a whirl. Wish me luck. I know that I will look back on this with some embarressment soon as I am sure this is easy. I tried to "wing it" last night before posting the question·but my right IR LED blew and developed a black streak on top of it??? Radio Shack...here I come!

    Thanks for the help guys,
Sign In or Register to comment.