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.
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.
04-29-2014 01:40 PM
Hello,
I've used Labview for some time but am new to Arduino. My objective is pretty straightforward: I have an Arduino Uno and a Weather Shield for it. I have successfully connected the weather shied to the arduino using these instructions: (https://learn.sparkfun.com/tutorials/weather-shield-hookup-guide/weather-shield-overview), I have uploaded the provided firmware sketch and I can read data in the Arduino IDE serial monitor as shown in the directions.
What I'm not sure how to do is get this data into Labview so that I can work with it in my VIs. I'm only trying to get temperature, humidity and pressure, at least at first. I've seen some examples of reading temperature and other data into Labview from Arduinos that includes using serial communications, but since I've uploaded the firmware to the Arduino I was hoping (perhaps unreasonably) that I could just call the myHumidity.readHumidity() function and get humidity data back, for example. Is there a way to do that with the Labview Interface for Arduino or do I need to go in a different direction?
I thought it was worthwhile to ask before I forged ahead. Any guidance is helpful. Thanks!
04-29-2014 01:51 PM
You have to be in communication with the Arduino. There's no way around that. The easiest way is to just use the serial port.
04-29-2014 03:34 PM
Thanks for the direction. Do you have any place you can point me then that will help me figure out how I get temp, humidity and pressure from the Arduino via serial communication? I've looked at some examples (such as for the thermistor read), but those don't seem to help me much in terms of getting data from a shield and into Labview. Are there any examples you know of that might be closer to what I'm trying to do? Thanks for your help!
04-29-2014 05:45 PM
04-29-2014 06:25 PM
Thanks for responding, Dennis. So what functions would I use in Labview to send commands and receive the data from the Arduino? Do I need to use the LIFA tookit or just standard Labview functions? I'm sure I can handle the parsing, I'm just not clear on exactly how I make Labview and the Arduino communicate. Any guidance is appreciated. Thanks!
04-29-2014 07:17 PM
04-30-2014 12:48 PM
Thanks, Dennis, that did work for me to read the data at the serial port.
I'd like to configure it a bit further so that I can send it a command to the Arduino and then get the data back, but I'm not entirely sure the right way to do that. Can I send a command using a serial write function that uses my own Arduino sketch code sent to the Arduino, which then would respond with the data I want? That would allow me to read the data at a time interval I specify or based on events, etc. rather than just at a set time interval, which is how the Arduino sketch I started with does it (once every second).
I'm going to work on that and see if I get good result, but let me know if you think that's a sensible approach. Thanks!
04-30-2014 01:04 PM
04-30-2014 03:59 PM - edited 04-30-2014 04:05 PM
(Dear) Dennis:
You may get hooked (or maybe even switch jobs). They do have tours (from their website):
Tours
If you ever find yourself in Boulder and want a tour - we love visitors! SparkFun scheduled tours run Fridays at 3 PM, and please call ahead 24 hours in advance so we know you’re coming!
-AK2DM
EDIT : P.S. I was joking about the Dear...
04-30-2014 05:24 PM