Welcome to Synthiam!

Program robots using technologies created by industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Oh Boy I Need A Little Basic Help

Hi!

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.

ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

AI Support Bot
Related Content
Synthiam
PRO
Synthiam
#1  
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...
#2  
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.

Scott
#3  
HI DJ,

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.

Scott
PRO
Synthiam
#4  
That's awesome! I bet they had a great time - thanks for sharing:D