How can i use the code given below to interface with labview (LIFA_Base)?

//Parameters
const int micPin = A0;
const int micPin2 = A1;

//Variables
int micVal = 0;
int micVal2 = 0;

void setup() {
  //Init Serial USB
  Serial.begin(9600);
  Serial.println(F("Initialize System"));
  //Init Microphone
  pinMode(micPin, INPUT);
  pinMode(micPin2, INPUT);
}

void loop() {
  readMicrophone();
  readMicrophone2();
}

void readMicrophone( ) { /* function readMicrophone */
  ////Test routine for Microphone
  micVal = analogRead(micPin);
  Serial.print(F("mic val ")); Serial.println(micVal);
  if (micVal > 600) {
    Serial.println("mic detected");
  }
}
void readMicrophone2( ) { /* function readMicrophone2 */
  ////Test routine for Microphone2
  micVal2 = analogRead(micPin2);
  Serial.print(F("mic val2 ")); Serial.println(micVal2);
  if (micVal2 > 600) {
    Serial.println("mic2 detected");
  }
}

Please search the forum for "LabView" related topics.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.