Pages: [1]   Go Down
Author Topic: Help detection program  (Read 233 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need help to make a program on ARDUINO software to detect a presence, an intruder, a security system infrared radar. Was my require that the detection is done in such a way that four areas is defined on the whole surface of a room and when an intruder enters a of these areas, an LED lights up, and the program is able to define what area the intruder was detected. Any help is welcome track. Thank you in advance to all.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How many sensors are you planning to use? How are they positioned? What sensors are they? What code are you using to read those sensors?

If you have a coding question, this is the right place. If you need help choosing sensors, etc, then Project Guidance is the place for you.
Logged

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

Thanks for your answer , my sensor is that it  http://www.lextronic.fr/P1750-telemetre-infrarouge-sharp-gp2y0a02yk.html   it is positioned in corner of a room and sweep of 45 degrees.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it is positioned in corner of a room and sweep of 45 degrees.
The code to do that looks like?
Logged

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

 The language used to program C, I already started but I can not define a detection zones and my program seems to me wrong:


Double acceptbleDifference = 10;
Double lastVar = getValue ();
Double newVar = getValue ();
while (fabs (newVar-LastVar) <= acceptableDifference)
{

  lastVar = getValue ();
  newVar = getValue ();
}
I started with the idea that the sensor and send waves pass an obstacle, the return value decline
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I started with the idea that the sensor and send waves pass an obstacle, the return value decline
Well, we have no clue what getValue() does. So, it is hard to help you.

The sensors you linked to measure distance. They tell you how far it is from the sensor to the object that the first returned wave echoed off of. They do not tell you where that object is, which object it was, or anything about the object. The object could be a desk that never moves. It could be an intruder. It could be anything.

Assuming that getValue() actually activates one of the sensors, and gets the distance from that sensor to some object, you then appear to be determining if the object is moving, because the distances are not the same, and because the difference is greater than less than some threshold. What do you intend to do in the while loop?
Logged

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

It's really just a start, but I'm not really comfortable with the language C, in the while loop I mean as long as we remain in this loop there is no obstacle, but if my program seems incomplete or wrong in this case and you have another track or another database program I'm interested.
Logged

Pages: [1]   Go Up
Jump to: