PIR sensors

Morgan AndersonMorgan Anderson Posts: 2
edited 2009-03-06 - 15:58:57 in Accessories
I'm working on a project for school currently and we have to make two robots communicate. I'm a beginner and havn't found much detail on sensors atleast at my level. So what i was thinking is using two PIR parallax sensors. How would i go about interfacing these to my robot which uses a 28 pin parallax BS2e, and what kind of code would i use?


  • SRLMSRLM Posts: 5,045
    edited 2009-03-06 - 02:04:35
    Okay, you're talking about two different things: communication and the PIR.

    Communication is easy: there are any number of wireless modules available, including a set that Parallax sells. Other popular choices are the Xbee family of radios.

    The PIR sensor is quite easy too. It simply has two outputs: see movement or doesn't see movement (high or low). You can just hook it up to a pin and us INX where X is your pin number.

    Take a look on the product pages for the sensors that you're looking at: they all have sample code for the BS2, but you don't need to change anything at all to use with the BS2e (except for the compiler directive)
  • Morgan AndersonMorgan Anderson Posts: 2
    edited 2009-03-06 - 14:49:26
    So i want to know if pir sensors or rf would be the better way to go with inter robot communication. also if i use·either·form·how do i interface the sensor or radio to my robot. When i program the robot am i programming the parallax sx chip, and the micro and rs232? or just the parallax. my robot has two spots to hook up to the parallax chip p0-p15 one with 220ohm resistors and one without. also i have to interface a lcd screen with my robot and display how my robots are communicating.
  • SRLMSRLM Posts: 5,045
    edited 2009-03-06 - 15:58:57
    The PIR sensor is not used for communication, and in no effective way can it be used to do so. It is a sensor that senses changes in IR light (movement of warm people).

    Generally, you don't program peripherals like the PIR sensor or a wireless module. For the wireless, you'll probably send it commands and data via a SEROUT command, or maybe a SHIFTOUT command.

    Like I said, take a look on the product pages from parallax. Sample code is generally available.
Sign In or Register to comment.