Introduction: Reading Real Time Analog Input Using Arduino and Plotting Using LabVIEW

When i was doing my projects one of the integral part was reading analog data and plotting it .Since i found no articles or instructable with reliable material to do it i thought of writing down the steps which i finally used to accomplish my task.

The software used is LabVIEW .

http://www.ni.com/download-labview/

After downloading LabVIEW Evaluation Version :

http://digital.ni.com/public.nsf/allkb/A20FBBD3682...

Step 1: Getting the Hardware Ready

Interface your Arduino Board to read Analog Input .And pass them as output value in your Serial Peripheral Monitor.

For example : If you are reading analog value from pin A0 and want to plot the data

const int analogInPin = A0; // Analog input pin that the potentiometer is attached to

void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); }

void loop() {

// read the analog in value: sensorValue = analogRead(analogInPin);

// print the results to the serial monitor:

Serial.print("sensor = " );

Serial.print(sensorValue);

// wait 2 milliseconds before the next loop // for the analog-to-digital converter to settle // after the last reading: delay(2); }

Step 2: Getting the Software Ready

After the hardware is ready and interfaced upload the file analog read file .

Power up the Arduino do not open the Serial monitor And make sure that the arduino IDE is not ope because if you try to open both ArduinoIDE and LabVIEW to read your data it will show you an error as the values coming over the SPI will be both be tried to be obtained by LabVIEW and ArduinoIDE.

How to open LabVIEW

Just download the attached VI(Virtual instrumentation) and open the Front Panel

Can you find comp port click the arrow and click on the PORT your arduino is connected to Be Careful to choose the right Port

Click on the button Read