Example Arduino basic serial read using LabVIEW. How to read analog data acquired by Arduino board using LabVIEW.
In this example I will show how to acquire analog signal with Arduino and communicate the data via serial port using NI LabVIEW software.
Download ZIP files containing Arduino code and LabVIEW software.
For this example I have used Arduino UNO board
The Arduino code is available at this link on github repository.
The code is very simple, you first setup the baudrate of the serial port and then in loop you acquire the analog input connected to pin A0 using analogRead() function. Finally Arduino print the data via serial port.
Arduino converts an analog input between 0 – 5 Volt in an integer number between 0 – 1023 by using the 10-bit analog to digital converter. analogRead() function returns the integer number between 0 – 1023.
The LabVIEW project is available at this link on github repository.
First you have to autodetect the Arduino board connected to your PC. Once the connection is established, the software setup the serial port and it is ready to read the data coming from the serial port. When data is available the software plot the data using a real time chart
The update repository of the example Arduino basic serial read using LabVIEW is available at this link on github repository