Asked
— Edited
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.
load ARC
add a script control (https://synthiam.com/Support?id=40)
edit script and add this code and configure your own ports for servo and ultrasonic sensor
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.
Scott
HI DJ,
Thanks again for your help!
While the boys didn't catch the leprechaun, they had a great time creating their trap.
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
That's awesome! I bet they had a great time - thanks for sharing