Hello everyone I am trying to get the sensor value from Serial Monitor of Arduino IDE to PLX-DAQ software.
I am getting the time value , but NOT the value of sensor reading . Here is the code I am using
int led=4;
int sensor=A0;
int threshold=90;
void setup() {
pinMode(4,OUTPUT);
pinMode(A0,INPUT);
Serial.begin(9600);
Serial.println("CLEARDATA");
Serial.println("LABEL,Time,value");
Serial.println("RESETTIMER");
}
void loop() {
int value=analogRead(sensor);
Serial.println("DATA,TIMER");
Serial.println(value);
Serial.println(',');
if (value>=threshold)
{
digitalWrite(4, HIGH);
delay(100);
}
else
digitalWrite(4, LOW);
delay(100);
}
and I bet you are not getting the time value either. The serial monitor is not a source of data.
PLX uses the PC clock to get the time, and I guess a timer as well.
I thought I was the last person in the known universe to be using the original PLX macro, but it seems that you are too and you may thus be getting no joy because you are not using Excel 2003 or earlier. If this is the case, you might look at using the newer version of PLX.