BOEBOT following using PIR
Hi
I need help. I am trying to make the BOEBOT follow my hand around a maze. I have currently connected the PIR sensor to the BOEBOT. But currently i have no way of knowing if the PIR sensor is working or not .Can anyone provide sample bs2 code that will use's the PIR sensor and makes the BOEBOT follow my hand.
Any help is appreciated.
Thanks in advance
I need help. I am trying to make the BOEBOT follow my hand around a maze. I have currently connected the PIR sensor to the BOEBOT. But currently i have no way of knowing if the PIR sensor is working or not .Can anyone provide sample bs2 code that will use's the PIR sensor and makes the BOEBOT follow my hand.
Any help is appreciated.
Thanks in advance
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
this might sound very obvious but Can someone explain to me if i want the BOEBOT to just turn on LED when motion detected and off when object idle. how do i setup the led and the jumper setting and how will the code code change from sample code above.
thanks SRLM for the link.
Yesterday using the test code I got the following result.
Main:
DO
DEBUG HOME, BIN1 IN0 ' Display Status Of P0 At Home Pos.
PAUSE 100 ' Small Delay
LOOP ' Repeat Forever
My BOEBOT doesn't still detect motion but it just keeps turning LED on and off when i put the output cable to the LED and if i attach the output to the pin0 on the debug terminal it just shows 1. i have played around with jumper setting but still had no luck. Can someone help me?
now i am using the single signal wire going into PO and still the problem remian it contenously changes from 1 to 0 and so on. but how do i·make·the·pin an input. here· is the sample code i used to test.
' {$STAMP BS2}
' {$PBASIC 2.5}
'--Warmup the PIR sensor
LoopCounter VAR Byte
FOR LoopCounter = 40 TO 1
· PAUSE 1000
NEXT
DO
DEBUG HOME, BIN1 IN0 ' Display Status Of P0 At Home Pos.
·' Small Delay
LOOP ' Repeat Forever
INPUT 0
before the PIR warmup loop.
That'll set pin 0 as an input, and thus actually read in the status to IN0
This won't work for what you want though... the PIR has much to large of a
detection field and much too much delay in each detection.
Once you get the BOE detecting you may be able to get it to work somewhat
by forcing the BOE to stop and wait a few seconds before going into detection
mode. You won't be able to detect properly while its moving.