07-23-2017 10:44 AM
Hi community!
Like many others here im quite new to Labview as well as Arduino. First I will write something about my project:
I have an Arduino Uno + Labview11 + a DHT22 temperature (T) and humidity (RH) sensor which is used to measure the temperatur of an airstream. In the end I would like to controll a heater and switch which will ensure a constant temperature and humidity in the air.
Right now I finished a working VI and Sketch to make the measurements of T and RH. First I tried it with LINX but there seem to be some problems getting a DHT22 running so it is now running via sketch+lib.
My question is very basic and please correct me if Im somewhere wrong in my explanation:
I want to set a limit value for RH in LV. When the real RH is higher, I need an output signal to set a switch. When the wanted RH is reached, the signal is switched of.
If I unterstand right, I have to set a digital output in labview and connect it with on of the output on my Arudino. Can I use the stuff from this small tutorial for it? https://www.arduino.cc/en/Reference/DigitalWrite
I would include the input into my Sketch which you can see below and set the outputs in LV and try to connect them?
#include <DHT.h> #define DHTPIN 2 //PIN DONDE CONECTAR LA SEÑAL DEL SENSOR #define DHTTYPE DHT22 DHT dht(DHTPIN, DHTTYPE); void setup() { Serial.begin(9600); dht.begin(); } void loop() { float h = dht.readHumidity(); float t = dht.readTemperature(); float tf = dht.readTemperature(true); Serial.print("H"); Serial.print(h); Serial.print("\t"); Serial.print("T"); Serial.print(t); Serial.print("\t"); Serial.print("F"); Serial.println(tf); delay(2000); }