06-15-2018 09:42 AM - edited 06-15-2018 09:44 AM
Hi,
I have a project which involves a DHT11 (Temperature and Humidity) sensor, a 16x2 LCD w/o I2C, Arduino, and LabVIEW as the main coder (LIFA).
When I first tested the DHT11 sensor using the LIFA DHTXX LV09 Rev B, which I got from one of the forums here, the results were okay.
I was getting around 31-33 temperature and humidity of around 69-71. Although when I added the code blocks for the 16x2 LCD, the sensor's data went from temp of 31 to 48 to 71 to 48 then back to 31 again as well as the data for humidity (attached below).
I am sure about the code for the LCD. It shouldn't affect the sensor's data since the LCD was only used for data output.
Any help would be greatly appreciated!
P.S. attached below is the code block used in labview. (pin 9 is DHT11 pin)
06-18-2018 01:40 PM - last edited on 08-14-2024 11:15 AM by Content Cleaner
Hi,
Since the results at first were ok, and after you added the code blocks for the 16x2 LCD, they changed. I recommend you to use the "Diagram Disable Structures" which helps you to run select portions of your code, in order for you to easily debug the error and to see if this still happens.
Link: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/structures/diagram-disable-structure.html
Regards,
06-21-2018 12:39 PM
Thanks for your suggestion, though I don't actually know what part of the code I should cease from working since it's a pretty simple code. Also, do you have any example of LCD 16x2 with or without I2C to work on LINX? I am currently trying the LINX environment if it would be any better than LIFA. I have searched almost all sites and I have not found a single working LCD 16x2 on LINX, is it even possible? Thanks again!
06-21-2018 04:54 PM
Hi paolo26 I know of something you can try with your original code. Put your DHT read subvi in line with your LCD code. Do not branch the arduino resource line as you are working with serial. I bet you are getting an error with one of the 2 close subvi's depending on the race condition of which one closes the resource first. Hopefully this will help.
The creator of the LIFA toolkit stopped support and development of it when he went on to develop LINX. LINX supports more devices and is better documented if you want to add something that isn't already supported. But even with LINX the forum support seems to be lacking at LabVIEW MakerHub.
06-22-2018 02:45 AM
Thanks GovBob for your suggestion! I have tried it with both the LM35 Temperature sensor as well as the DHT11 Humidity and Temperature sensor but both sensors gives the same problem as before on the non-linear code block. I really don't understand how come that a display device such as an LCD can affect the data on my sensors. Thanks again anyway!
06-22-2018 04:17 AM
Hello again, I have tried working with LINX and it really is better and bug-free compared to LIFA. I'm just trying to configure the LCD cursors to have the string "Temp: " displayed with the reading beside it. Thanks again! 😄
06-22-2018 02:52 PM
I'm glad you are making some headway. Did you find some vi's in the LINX toolkit that support your 16x2 LCD display? If not you will probably have to find a arduino library that works on your particular hardware and create a custom command for it according to the LabVIEW MakerHub documentation that Sam K. put together.
As to why you should not branch the Arduino Reference wire Sam's FAQ's describe it pretty well in layman's terms.
When you get this working why not post your solution as I'm sure a lot of people will benefit from your solution? Probably the best place to do this is the MakerHub LINX forum under a new topic with a link to it from this forum.
06-26-2018 03:29 AM
Hi, sorry for the late reply. I was a bit busy preparing for our presentation on the said project. Regardless, can you recommend or teach me how or where I can post the project online in order for me to share it with everyone else? Thanks again! 🙂
08-27-2018 11:28 PM
Hello, I do the same job using DTH11 and when executing the program I get the same error. Please, if you have found the solution very helpful. Sorry for the English I'm from Argentina
08-28-2018 05:22 PM