Pages: [1]   Go Down
Author Topic: Motion PIR Sensor // weird stuff ...  (Read 470 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there!

I've just bought a new PIR Sentor, and I'm trying to make it work, just changing the state of a LED depending on the sensor value.

The sensor is this one you can find on "cool components" website.

First of all, I've been trying many different codes.

And at the end, I just get some weird stuff, the led is kind of blinking, even if there is nothing detectable. And I'm extremely sure there is nothing to detect.

Should I use the digital values ? Or the analog values ?

Also, I tried to change the wires ... the black (alarm, weird again, why not ground?) on the ground, and the brown(ground) on the INPUT pin 2.

And from this, I don't even get anything more. 0 informations.

Do you think it's possible I just broke my component?

A little help and explanations would be great smiley I'm kind of a noob with arduino ...

Thank you a lot smiley


Edit: Maybe nothing is broken, but maybe I'm magnetic, without event touching the wires, I my fingers are close enough I trigger the system ... and led blinks very fast !

Anyone ?
« Last Edit: November 06, 2010, 10:22:01 am by Dermiste » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

one more weird stuff smiley-grin

When my Mac is plugged for power, I get 4 cyclic values in the analogRead, when the mac is unplugged ... I get some workable values.

Do someone now the value of the digital "HIGH"?
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 223
Posts: 13895
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have the datasheet of the PIR sensor? It will contain all information needed how to connect to it.
 
Quote
Do someone now the value of the digital "HIGH"?
Try Serial.println(HIGH, DEC);
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Essex, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 150
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Show us your circuit please, and a direct web link to the sensor on the vendor's site wouldn't hurt either.

PS, from wiring.h:

Code:
#define HIGH 0x1
#define LOW  0x0
Logged

Home of the Nokia QVGA TFT LCD hacks: http://andybrown.me.uk

Pages: [1]   Go Up
Jump to: