EFX-TEK

TEK Talk => Prop-SX => Topic started by: wseay on December 14, 2009, 12:38:57 AM

Title: Basic Servo Toy with PIR
Post by: wseay on December 14, 2009, 12:38:57 AM
I have some downtime and I would like to start getting to know my Prop-SX.  I would like to create a simply toy that when triggered by a PIR, it jiggles a servo back & forth.  I will attach some Jingle Bells to the servo.  Now visitors will be greeted by the Merry Jingle Bells when they walk up to the door.

I realize that the SX board is way overkill for this.  But I thought this would be a good base to get started with.

I appreciate any code to get me started.
Title: Re: Basic Servo Toy with PIR
Post by: JonnyMac on December 14, 2009, 01:03:45 PM
Would you be more specific about "back and forth"?  Is this full CW to full CCW?  On random position to another?  And for how long should that movement continue after the detection of a PIR input?
Title: Re: Basic Servo Toy with PIR
Post by: wseay on December 14, 2009, 01:26:27 PM
Once triggered, the servo should move CW 90 degrees from home in one second and then back to home in another second (approx).  The servo will be mounted with the horn pointing down and the bells suspended underneath.  So I don't think we will need to hold the servo position.

The routine should repeat three times and then wait 1 minute before the next trigger.
Title: Re: Basic Servo Toy with PIR
Post by: JonnyMac on December 14, 2009, 01:47:25 PM
So, basically...

1) Wait for trigger
2) Ding, ding, ding....

Where the servo handles the with about a 1-second delay in between?
Title: Re: Basic Servo Toy with PIR
Post by: wseay on December 14, 2009, 06:04:29 PM
More like jingle, jingle, jingle.  :D

But yes, you are correct.

I know how to do this with my Prop-1.  But I thought this would be a good transitional project for the Prop-SX.