From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino + labview + sound + temp humidity + light.

This is my first post on a form. First coding project. This is a first-year engineering project. I'm not sure about the forum etiquette. I have gathered a bunch of code and slapped it together and it almost does what is intended. I am certain there are better ways to do this but I only need it to function for about 10 days for this project to be completed.  What I need is to collect data from a light sensor, DHT 11 temp and humidity sensor, and a sound recorder (not sure of the make). I have put code together capable of logging the needed data on the serial monitor. Then using LabVIEW I can write to a txt. file. The problem is I only need data every hour or something like that and I only need the info from the sensors I am getting a lot of extra text. Ideally, the info would be in excel. I am more capable in excel than in any other program. The sound recorder needs a few seconds of data at a time to show any activity. I'm willing to start all over again if this can be done more easily. I have about 4 hours of experience with Labview and even less with Arduino but I am interested and will continue to learn. I would sincerely appreciate any help available.  

 

0 Kudos
Message 1 of 5
(1,038 Views)

If you only need data once an hour (or at regular intervals) how about programming your Arduino to respond to a query instead of constantly sending data?  

========================
=== Engineer Ambiguously ===
========================
Message 2 of 5
(1,017 Views)

That sounds like a better idea. I honestly didn't even know what to google. I will try learning about query. 

0 Kudos
Message 3 of 5
(997 Views)

I haven't had any luck locating a suitable example of code that could be modified to handle a periodic query. I know the information is out there it is just buried under hours on irrelevant info. Could you please help me in posing the question to Google that might lead to relevant sources so that I may copy and modify. I am not capable of writing code from scratch yet. I am learning by dissecting functional code and testing. Thanks.

0 Kudos
Message 4 of 5
(988 Views)

There are examples of this type of protocol in the Arduino example library. Check out https://docs.arduino.cc/built-in-examples/communication/SerialCallResponseASCII

 

The Arduino can even check what bytes were sent by the computer and react differently, depending on the input and current execution state.

0 Kudos
Message 5 of 5
(945 Views)