Can a PIR motion sensor be used with EZB4. If so...
Community Robot Questions Pir Sensor Slee The Sloth USA Asked Jun 2015 — Edited Jun 2015 Pir Sensor Can a PIR motion sensor be used with EZB4. If so can you show mw an code example? Thanks Skip to comments Upgrade to ARC Pro Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success. Compare Pro Features View Subscription Plans Steve G United Kingdom #1 Jun 2015 You sure can use a PIR sensor with the v4. It uses a digital port (with regulator if needed). Here's a quick script example... Code: Assuming PIR is connected to port D0 :start If(getDigital(D0)=1) Print ("On") Elseif(getDigital(D0)=0) Print("Off") Sleep (2000) Goto(start) Endif This is a very basic script, so you may want to add "Repeat" commands in to your script. Here is the link to a thread I started asking the same question, and a short video demo. Slee The Sloth USA #2 Jun 2015 Thanks, Just what I needed. Login to post a comment
Slee The Sloth USA Asked Jun 2015 — Edited Jun 2015 Pir Sensor Can a PIR motion sensor be used with EZB4. If so can you show mw an code example? Thanks Skip to comments
Steve G United Kingdom #1 Jun 2015 You sure can use a PIR sensor with the v4. It uses a digital port (with regulator if needed). Here's a quick script example... Code: Assuming PIR is connected to port D0 :start If(getDigital(D0)=1) Print ("On") Elseif(getDigital(D0)=0) Print("Off") Sleep (2000) Goto(start) Endif This is a very basic script, so you may want to add "Repeat" commands in to your script. Here is the link to a thread I started asking the same question, and a short video demo.
You sure can use a PIR sensor with the v4. It uses a digital port (with regulator if needed). Here's a quick script example... Code: Assuming PIR is connected to port D0 :start If(getDigital(D0)=1) Print ("On") Elseif(getDigital(D0)=0) Print("Off") Sleep (2000) Goto(start) Endif This is a very basic script, so you may want to add "Repeat" commands in to your script. Here is the link to a thread I started asking the same question, and a short video demo.
You sure can use a PIR sensor with the v4. It uses a digital port (with regulator if needed). Here's a quick script example...
Code:
Assuming PIR is connected to port D0
:start If(getDigital(D0)=1) Print ("On") Elseif(getDigital(D0)=0) Print("Off") Sleep (2000) Goto(start) Endif
This is a very basic script, so you may want to add "Repeat" commands in to your script. Here is the link to a thread I started asking the same question, and a short video demo.
Thanks, Just what I needed.