Go Down

Topic: Problems with PLX DAQ (Read 430 times) previous topic - next topic

Izzy13

Hi there!

I'm having trouble with the software, the interface says it is connected but there is no data coming to the excel

Code: [Select]

const int flexPin0 = A0; //pin A0 to read analog input
char string0 = 'W';

//Variables:
int value0; //save analog value



void setup(){
 

  Serial.begin(9600);       //Begin serial communication
  Serial.println("LABEL,Sensor value");


}

void loop(){
 
  value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer
  Serial.println(value0);               //Print value

  delay (1000);

 
 


Can somebody help?

sumguy

Try inserting this line......it's described in the manual

Code: [Select]
  value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer
  Serial.print("DATA,");
  Serial.println(value0);               //Print value

Izzy13

Thanks!

But now I have another problem regarding the naming of columns.

By default it shows Date Time Timer Counter and Millis

When I place this in setup
Code: [Select]
void setup(){
Serial.begin(9600);
// while the serial stream is not open, do nothing:
while (!Serial)
{
    // do nothing
} ;

  Serial.println("CLEARDATA");
  Serial.println("LABEL,A,B,C, D,E");
}


The column name does not change but the values enter into excel one by one

When I place it at loop

Code: [Select]
void loop(){
 
  value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer
  Serial.println("LABEL,A,B,C, D,E");
  //Serial.print("DATA,TIME,TIMER");
  Serial.println(value0);               //Print value

 
  delay (1000);

 
 
}


The column name changes but the data keeps on replacing itself.

Pls help.

P/S: The (!serial) is because I use Leonardo

GijKieken

Label should be placed in setup.

Izzy13


GijKieken

I doubt if you have done the effort on reading the beginners guide.
Net-Devil has done a great job on this.

Go Up