Hello , i'm facing a porblem during printing value on excel sheet, it print only value of x,
i want to print both value x , and y in excel using plx daq. pleas help me
type or paste code here
```#include "Wire.h"
#include <LiquidCrystal.h>
#define EEPROM_I2C_ADDRESS 0x50
LiquidCrystal lcd(12,11,5,4,3,2);
int z;
byte i;
byte adcdata[8];
unsigned int x2,x3,y2,y3;
unsigned long x,y,x1,y1,Adata,Bdata;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(20,4);
Wire.begin();
analogWrite(6,z); //Display intensity
pinMode(13,OUTPUT);
Serial.println("CLEARDATA"); //clears up any data left from previous projects
Serial.println("LABEL,TIME ,DATA,ADC1,ADC2,ADC3,..."); //always write LABEL, so excel knows the next things will be the names of the columns (instead of Acolumn you could write Time for instance)
Serial.println("RESETTIMER"); //resets timer to 0
}
int adc (){
top:
for(i=0;i<8;i++)
adcdata[i] = 0;
digitalWrite(13,LOW);
i=0;
while (adcdata[0]!='N')
{
if (Serial.available())
adcdata[0] = Serial.read();
}
i=1;
while (i<9)
{
if (Serial.available())
adcdata[i] = Serial.read();
if (adcdata[i]=='N')i=1;
else if (adcdata[i]!=0) i++ ;
}
x3 = adcdata[4];
x2= adcdata[3];
x1= adcdata[2];
y3 = adcdata[7];
y2= adcdata[6];
y1= adcdata[5];
delay(100);
if (adcdata[1]=='V')
{
y= (y1*256*256+y2*256+y3)/100;
x= (x1*256*256+x2*256+x3)/100;
digitalWrite(13,HIGH);
Serial.println(x);
Serial.println( y);
return x,y;
}
else
goto top ;
}
void loop() {
Serial.print("DATA,TIME,TIMER,"); //writes the time in the first column A and the time since the measurements started in column B
int g,j;
x,y=adc();
j=y;
Serial.print(x);
Serial.print(",");
Serial.println(j);
Serial.println('...'); //be sure to add println to the last command so it knows to go into the next row on the second run
delay(100); //add a delay
lcd.clear();
lcd.setCursor(5,1);
lcd.print(x);
lcd.setCursor(5,3);
lcd.print(j);
delay(1000);
}