I've made a kind of noise pollution sensor with a sound sensor, some LED pins and an LCD display. It takes values from the sound sensor, then checks if it is more than the threshold value. If it is, it lights up the LED and displays a message on the LCD display. Pretty basic stuff.
I also wanted to take the values from the sound sensor, send it to Excel using PLX-DAQ and plot a real-time graph depicting the peaks in sound values.
Everything works fine, except the fact that nothing shows up on Excel. The program executes perfectly, I can even see the values of the sound sensor on the Serial Monitor but there's nothing on Excel.
I'm using an Arduino/Genuino 101 on a Windows 7 machine, with Microsoft Excel 2010.
Device Manager says that my board is connected to COM17 (it's the only port where I'm able to upload anything on the board, the laptop doesn't detect the board on any other port). Now, as you all would know, the Ports drop-down menu in PLX DAQ goes only uptil 15. So, I manually selected all the ports one by one to see where my board is.
PLX-DAQ detected the board on port 3. The C, R and T characters became green in colour and it said "Connected". But when I ran the program, nothing showed up on Excel. It doesn't say "accepting data for row 1, row 2.." like I was expecting it to. It just sits there like that. (I clicked "OK" when it said PLX-DAQ wants to use ActiveX controls, so I don't think that's the problem).
I reinstalled PLX-DAQ but to no avail. I went to their official website and there it says:
"System Requirements
Microsoft Windows 98
Microsoft Office/Excel 2000 to 2003
May not work with newer software; no longer supported "
This made me suspect that maybe PLX-DAQ is not supported on Excel 2010. That is the only logical conclusion that is left, I've exhausted all other options.
But I really need a real-time graph of the sound sensor values for my project. Is there any way I can do this? Is there an alternate version of PLX-DAQ for higher versions of Windows or Microsoft Office? If not, is there any other method to plot a real-time graph of the sound sensor values?
Any help will be appreciated. Thanks.
PROGRAM CODE:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
Serial.begin(9600);
pinMode(A1, INPUT);
pinMode(13, OUTPUT);
Serial.println("CLEARDATA");
Serial.println("LABEL, Current Time, Sound Level");
lcd.setCursor(0,1);
lcd.begin(16, 1);
lcd.print("LCD OK!");
}
void loop() {
lcd.setCursor(0, 1);
int ledState = LOW;
ledState = digitalRead(13);
int soundSensorVal = 0;
int threshold = 130;
soundSensorVal = analogRead(A1);
if(soundSensorVal>=threshold)
{ digitalWrite(13, HIGH);
Serial.print("DATA,TIME");
Serial.println(soundSensorVal);
delay(100);
lcd.clear();
lcd.print("DANGER!");
}
if(soundSensorVal<=threshold)
{ digitalWrite(13, LOW);
Serial.print("DATA, TIME,");
Serial.println(soundSensorVal);
delay(100);
lcd.clear();
lcd.print("SAFE!");
}
}