Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

DHT 11 temperature to Arduino -> LabVIEW

Hi, I'm looking for support/help with my little project. It is a simple temperature controlled by a fan in the room. It is primarily a simulation, not an actual project.
It roughly looks like this:
- DHT 11 sensor receives temperature to Arduino and then to LabVIEW
- in LabVIEW, shows up the actual temperature and controls it by PDI (doesn't have to be too precise, just simulation)

- If possible, PDI sends a control signal to the fan (it can be virtual to simulate a change of temperature) fan receives a PWM signal in ARDUINO and works according to the desired temperature.


So far, using a visa connection with Arduino, I could read temp and humanity from Arduino. Still, problems occurred with transmitting the signal back to Arduino with PWM to control a fan.
Attached is a VI and Arduino code,
many thanks

 

0 Kudos
Message 1 of 4
(1,830 Views)

I was blocked by NI when answering you question.

 

next try:

 

Your visa read vi asks for 9600 characters.That is a lot for just a temperature.

And I did not find the library in your zipfile, only a very short program that imports that lib.

Can yuo send that library too?

greetings from the Netherlands
0 Kudos
Message 2 of 4
(1,789 Views)

Hi, sorry for the late response; I updated the program and started working if you have any suggestions, please share them with me.

I just base it on VI, and what suits me is not a bit big project, just a simulation.

Many thanks and greetings from Ireland 

Download All
0 Kudos
Message 3 of 4
(1,742 Views)

Hi

I made a few changes. I did not understand why you had to close both visa resources? In fact it is only one resource.

 

Second I used the visibility of the display indicator of Humidity and Temperature instead of a separate indicator. If you right click on a control you can select that visibility.

 

Third I added a feedback loop to the text save, to prevent to type in that name more than once, but I don't know if that ws a problem.

 

4th I added a real simulation in LabVIEW for reading from the arduino, so now you can simulate your arduino as well

greetings from the Netherlands
0 Kudos
Message 4 of 4
(1,703 Views)