I have an Arduino UNO, and for a schoolproject am doing a fire sensor array. The idea is for a bunch of UV or IR sensors to be set in a fan type shape, covering a wide area. There will be 2 of these arrays with multiple sensors, all talking to the same Arduino, but I need help with the coding, since as well as telling you if there is a fire in its area, they should be able to use trigenometry and be able to pinpoint where the fire is, since we know how far the arrays are away from each other and we have the distances from the 2 arrays to the heatsource. Now I need help with how to implement this, how to code this into the arduino. I have no clue how to code the arduino to do the above mentioned, and would appreciate some help.
Thanks in advance
Marlo
You must have some code for getting data from the sensors. Post that, so we know that you are trying.
This is not the place to cheat on homework assignments. We'll help with suggestions, when you prove that you are trying.
Thank you, I shall do that as soon as possible. Dont worry, I am not trying to cheat on any homework assignment:). Its a project, meant for 2 weeks from now. I shall post the sensor info here as soon as possible, struggling to find the right type to buy at the moment.
So the sensor we are going to use is the KY-022. If you google those you get the code. The KY-022 is the receiver. What would I have to do with the available code, found here;TkkrLab
To make it so that if 2 sensors from the 2 diferent arrays, one from each, see the heatsource, it will send it back to the computer and tell me in what area it is, or so that it simply pops up that the overlapped area of, for example, sensor 1A and 2A, is where the heatsource is. Their will be some kind of blind in between each sensor so their fields of view do not overlap. I will be drawing out a diagram on the board to be used for mounting the sensors on, and a page with that will name each area that can possibly be overlapped, so that you can just do a quick crosscheck. For example, sensors 1C and 2B are detecting an infrared source. (this is simply a small scale model, so we are just going to use infrared) Then I simply go to the table pinned up nearby and trace down with my finger till I find the correct matchup, and the grid reference.
So the sensor we are going to use is the KY-022. If you google those
YOU do the googling, and post links AS LINKS, NOT as text!
Post the code HERE if you want help understanding it.
Sorry, I shouldve worded that better. The code is in the link that follows, I forgot to erase that sentence. I am sorry I am still learning here and did not manage to post it as a link. I still cant. It only goes to text. I didnt give you the code, I am terribly sorry about that, I dont know what made me put the link there, probably becuase thats how we do it at school, I wont do it again. This is the demo code from the link I sent. I am not sure what that means, and I will google it.
This is what it says:
/*
- IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
- An IR detector/demodulator must be connected to the input RECV_PIN.
- Version 0.1 July, 2009
- Copyright 2009 Ken Shirriff
-
http://arcfn.com
*/
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
Please do not get mad at me if that is still wrong.
I'm having difficulty picturing your setup. The module you mention is an IR receiver, and you say there are two arrays of them. Do you have several Arduino UNOs each hooked up to a KY-022? Are you using a remote control to simulate a heat source?
If I walked into the room to look at the setup, what would I see?
I guess it only works on 38KHz fires then.
What MorganS is trying to tell you is that the KY-022 sensor won't work for detecting a heat source.
The MLX90614 sensor will detect a heat source, as will the Grid-Eye sensor. The latter will tell you which direction to look as well.
I still cant.
The icon to the left of the X2 icon is the one you use to create a clickable link from the text.
What does the following error message mean?
Arduino: 1.8.2 (Mac OS X), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
Sketch uses 3302 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 324 bytes (3%) of dynamic memory, leaving 7868 bytes for local variables. Maximum is 8192 bytes.
Board at /dev/cu.usbmodem1421 is not available
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
OK, wait, I found the setting in the preferences as suggested.