Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Pir Sensor

Can a PIR motion sensor be used with EZB4. If so can you show mw an code example? Thanks:)


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

AI Support Bot
Related Content
Synthiam
United Kingdom
#1  
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.:)