Exporting DHT22 Temperature and Humdity data to PLX-DAQ Problem: ASCII Strings

Hello there,
I'm just a begineer and I've searched the forums to no avail about this topic.

I'm trying to send DHT22 temperature and humidity data to excel using the standalone excel program, PLX-DAQ.
However I get the error message: " Error: Data < ASCII 10 or > ASCII > 200"

I'm guessing there is some data type incompatibility? (an integer is expected when it's sending a string to PLX-DAQ?, or vice versa).

What should I change in the code to make it compatible? Ideally, temperature and humidity will be in separate columns.
Additionally, each reading is of the following format from the serial monitor:

Humidity: 61.50 %	Temperature: 18.60 *C
Humidity: 61.50 %	Temperature: 18.60 *C
Humidity: 61.50 %	Temperature: 18.60 *C

The code is as follows:

// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain

#include "DHT.h"

#define DHTPIN 2     // what pin we're connected to

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // DHT 11 
#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(38400);
  Serial.println("DHT test");

  dht.begin();
}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  // check if returns are valid, if they are NaN (not a number) then something went wrong!
  if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.print("Humidity: ");
    Serial.print(h);
    Serial.print(" %\t");
    Serial.print("Temperature: ");
    Serial.print(t);
    Serial.println(" *C");
  }
}

Thank you for whoever helps me.

Cheers,
DennyP

Are the "Temperature " and "Humidity " strings going to be useful on every record of your excel file? If not, get rid of them. Send just h and t, possibly with a comma between them.

Hello PaulS.

Definitely not. I was thinking about sending the H and T separated by a comma but I don't know how I should edit the code to do this (i've tried heaps),

I don't know how I should edit the code to do this

    Serial.print(h);
    Serial.print(",");
    Serial.print(t);

The last one might need to be println().

Hello PaulS,

Sorry for the late reply, BUT IT WORKED.

Here is the new code now

 // Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain

#include "DHT.h"

#define DHTPIN 2     // what pin we're connected to

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // DHT 11 
#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(38400);
  Serial.println("LABEL,Time,Temperature (C), Humidity (%)");  

  dht.begin();
}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  delay(60000);

  // check if returns are valid, if they are NaN (not a number) then something went wrong!
  if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.print("DATA,TIME,"); Serial.print(t); Serial.print(","); Serial.println(h);
  }
}

Hey.
I have been using the Arduino for 4 days now and have been able o successfully hook up an LCD and communicate with a DHT22. I would like to log data into an .xls . I have the PLX-DAQ and am not sure how to use its logging functionality. Can I have any links to a setup tut?

PS: The help file is not effective.

Sukesh