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

Oh Boy I Need A Little Basic Help


After a long, long two weeks of mind-draining work, both my sons sprung a - let's build a leprechaun trap using an ultrasonic sensor and a servo - project on me.

While I know that I can figure it out if i had a few more days of lead time, would someone help me relearn how to get an ultrasonic sensor to trigger a servo to move 45 degrees in one direction, pause 2 seconds then return to its original position?

I promise to revisit the tutorials when I mentally recover from my day job, so I won't ask such a question again.

Anyway, a sincere and humble thank you.


Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
1) load ARC

2) add a script control (https://www.ez-robot.com/Tutorials/Help.aspx?id=40)

3) edit script and add this code and configure your own ports for servo and ultrasonic sensor

User-inserted image

PS, you can also add some SAYEZB command in the IF condition that says out of the speaker "I TRAPPED ONE!" or something...
Thanks DJ!

My sons will be excited to finish their "high-tech" trap!

I'm sure they will be more than happy to share a part of their pot of gold bounty should they catch the leprechaun.


Thanks again for your help!

While the boys didn't catch the leprechaun, they had a great time creating their trap.
User-inserted image

Never rest on your laurels, I guess. My boys are already planning next year's trap. I heard something about lasers, a falling cage and magnets.

That's awesome! I bet they had a great time - thanks for sharing:D