Thanks for the replies, everybody. I am confused about the voltage requirements of the BBB...it accepts a 5V power supply (in the slot next to the ethernet cable input), and yet it is a 3.3V device? In addition, the demo prescribes that the PIR be powered by pin P9_5, which is a 5V supply. So if you could further explain how/why the BBB is a 3.3V device, I would appreciate it.
I am glad you brought this up, however, because I used my DVM to check the voltage supplied by pin P9_5, and it turned out to be 0...! My PIR wasn't being powered at all. Perhaps this was because the BBB was only powered by the USB cable to my computer, and not a 5V supply? In any case, I switched the PIR's power line from pin P9_5 to pin P9_3 (3.3V power supply). In that case the PIR was powered, and it finally did *something*: when I ran the demo, it continually oscillated between detecting motion and not detecting motion--even though there was nothing moving in front of it! The LED light turned on and off pretty regularly, with a period of about 5 seconds. Perhaps this is somehow due to the PIR not being supplied the full 5V? Also, Dennis, thank you for pointing out that the demo page does in fact have a link to purchase the PIR they mention. I had only looked at the analogous page when my BBB was hooked up to the computer, and for some reason this version of the page did not include those links. Thank you for pointing that out. On Friday, December 16, 2016 at 10:41:09 PM UTC-5, Chris Fink wrote: > > This is my first time using a BeagleBone Black (it's a Rev C), and I > started out with the "Blink on-board LED > <http://beagleboard.org/Support/BoneScript/demo_blinkled/>" and "Blink > external LED > <http://beagleboard.org/Support/BoneScript/demo_blinkled_external/>" > demos, both of which worked perfectly. Then I advanced to the PIR Motion > Sensor demo <http://beagleboard.org/Support/BoneScript/PIRMotionSensor>, > and I'm quite certain I connected everything just as they said, but I can't > seem to get it to work. > > At first the LED light turned on right away, and I got a constant > succession of "Motion Detected" messages. Then I realized that the code > assumed an active-LOW output from the PIR, but my PIR is active-HIGH > <https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/>, > so I changed the lines > > > > *if(x.value === 0){ b.digitalWrite(led, 1); > console.log("Motion Detected");* > > to instead be > > > > *if(x.value === 1){ b.digitalWrite(led, 1); > console.log("Motion Detected");* > > In this case the light does *not* come on, and I get a constant > succession of "No Motion Detected" messages...and the PIR never detects > motion, no matter how much I move, or how close I am. I even tried a > different PIR > <https://www.virtuabotix.com/product/virtuabotix-pir-motion-sensor/> > (also active-HIGH), and got the exact same results. I also tried removing > the pull-up resistor, which also did not work. > > > Then I found this post... > > > https://groups.google.com/forum/#!searchin/beagleboard/pir%7Csort:relevance/beagleboard/ydD2Cyi5fJo/QK0jHa53NMgJ > > ...which makes me think that the demo isn't working because I'm not using > the *exact* PIR sensor prescribed in the PIR Motion Sensor demo > <http://beagleboard.org/Support/BoneScript/PIRMotionSensor>. If that is > the case, where do I purchase that PIR sensor? I cannot find a link to it > anywhere. > > > Thanks in advance for the help! > > > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/af5f866e-dde0-45fa-ba40-475f9c2b2721%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
