Labview DHT22 Digital sensor read

Hi,

I am trying to get my Arduino UNO to read a DHT22 sensor, which is Digital through a serial port(USB), and than output the data on a nice Labview graphic , yet so far with no luck...
I would be thankful for any guidelines and really grateful for an example.
Thanks in advance.

I am trying to get my Arduino UNO to read a DHT22 sensor, which is Digital through a serial port(USB), and than output the data on a nice Labview graphic , yet so far with no luck...

The UNO has one hardware serial port. Do you want to use it to talk to the DHT22 sensor OR to LabView?

I want the UNO to read the information from the sensor DHT22 (thorugh digital pin) and than send it over serial port to my main PC and Labview.

http://playground.arduino.cc/Main/DHTLib

The DHT22 is not a Serial device. Reading from the sensor using the library is easy. Writing the results to the serial port is easy.

Yeah, it is. I did that, it was very easy, but after that, how do I get the data into Labview, because I need the data to be read into Labview, how do I make that happen?

how do I make that happen?

Using either Serial.print() or Serial.write(), depending whether LabView expects binary or ASCII data.

On Labview there is an Arduino Labview interface (LIFA base), which needs to uploaded up, do I just stick the header of DHT22 library in that?
Because I would also like to be able to control other activities + the data read, how would I combine these togeather? There are actually 2 readings (from thje library) temperature + humidity, how do I read boath of them?

I have attached a VI that should give you a good start. Use Serial.println(yourSensordata) in your code. make sure you use the correct baud rate on each end. The VI acts just like the arduino com port. Let me know if it works.

DHT22Test.vi (11.2 KB)

1 Like

Thank you a lot it works, this basic example helped me a lot. But still I can't really figure out, how to read Humidity + Temperature, how do I split the data up ? Also will be able to setup up a connection where I can send my data back, like for example turn on a LED at a certain temperature.

linkers pm me, and I will help you best I can. Its a steep learning curve, but once you get it you will be able to do anything. Its all about parsing the data. Split up the data by a , _ or a space then parse the data in labview. then you can graph the different data. you can have lines after lines of data. Keep me posted.

Sending info is also very easy in labview. Just use serial write VI.

what version of labview do you have? a legit version?

show your code, both for arduino and labview if you can.

working solution :slight_smile:

hello everyone,
Your thread is interesting for me,
I am also trying to do the same as Houser636 read the temperature and humidity values from 3 DHT22 interfacing with Renesas V850 controller + labview application for that. can I interface 3 sensors data pin to 3 Digital IO pins and read digital values to registers of controller. I am also thinking to connect my controller to ethernet IC and via TCP/IP ethernet connection can I display my values to pc. can anyone give me some start up how to do. Can anyone help me regarding DHT22 library.
thankyou,

If you send me a Renesas V850 controller I can try to port my DHT library to that platform. :slight_smile:

same problem but i am using delphi. anyone can help

Greetings, I have a problem with the serial port, it worked normally until I installed labview and the (NI-VISA) to get it synced with arduino, when I run a program in labview my computer no longer recognizes the serial port to which the arduino is connected, now every time I connect the arduino to the serial port, it recognizes it for a moment and then disconnects it.

AlTaype:
Greetings, I have a problem with the serial port, it worked normally until I installed labview and the (NI-VISA) to get it synced with arduino, when I run a program in labview my computer no longer recognizes the serial port to which the arduino is connected, now every time I connect the arduino to the serial port, it recognizes it for a moment and then disconnects it.

LabVIEW does not release a serial port until LabVIEW closes.

Installing LabVIEW and NI-VISA will not "change" a serial port.