Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Arduino + PIR Sensor +(2) Continuous Servo + LED
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino + PIR Sensor +(2) Continuous Servo + LED

by arduino0b on Sun Apr 12, 2009 7:09 pm

Hello. I'll just get to the point,

materials:
Arduino Duemilanove
Parallax PIR Sensor
Parallax Continuous Servo x 2
LED (red)

I'm having trouble trying to find code that integrates both the PIR sensor and servo together. Basically I want to create a little "robot" figure that is stationary that can react to basic movements with the PIR sensor (movement = ON, no movement = OFF) to trigger the robot's subtle movements. The first servo is used to twist its "waist" back and forth and the second servo would flick back and forth like a twitching antennae. And lastly the LED would turn on during movement detection.

I'm a complete Arduino super noob. I've been able to find code for the PIR sensor (that also has an LED status ON) and the servos but I haven't had any luck integrating them together though I've got the code to work with them individually.

Can anyone help point me in the right direction please? I'll even draw you a fine portrait of your dog too! Any help would be very much appreciate it!
arduino0b
 
Posts: 2
Joined: Sun Apr 12, 2009 7:03 pm

Re: Arduino + PIR Sensor +(2) Continuous Servo + LED

by adafruit on Sun Apr 12, 2009 7:12 pm

as with any engineering project
get the servos working, write a sketch that makes them do what you want
get the PIR sensor working, write a sketch that lets you detect when its activated
then you can merge the two.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Arduino + PIR Sensor +(2) Continuous Servo + LED

by arduino0b on Sun Apr 12, 2009 7:22 pm

how should i organize the code?
arduino0b
 
Posts: 2
Joined: Sun Apr 12, 2009 7:03 pm

Re: Arduino + PIR Sensor +(2) Continuous Servo + LED

by adafruit on Sun Apr 12, 2009 8:29 pm

you are confused
as with any engineering project
get the servos working, write a sketch that makes them do what you want
get the PIR sensor working, write a sketch that lets you detect when its activated
then you can merge the two.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Please be positive and constructive with your questions and comments.