mardi 6 mars 2018

interfacing Arduino with LabView

 


welcome guys, it's been awhile ,
 today's topic is about making a simple vi, this vi will allow us to read data from arduino unsig the visa module for that  we need to open a connection with the port defining Arduino then read data and show it as a graph
the main objectif is to read data from serial and make a graph with it


enjoy

arduino code 


int pot0 = A0 ;

String st0="0000";

void setup() {

     Serial.begin(9600);

}


void loop() {

  int p0 = analogRead(pot0);
  st0[0] = p0/1000 + 48;
  st0[1] = (p0/100)%10 + 48;
  st0[2] = (p0/10)%10 + 48;
  st0[3] = p0%10 + 48;
  

  Serial.print(st0);
  Serial.println("");
 delay(100);
}


labview

front panel



block diagram









Aucun commentaire:

Enregistrer un commentaire