reading analog input + PLX-DAQ

thanks for your suggestion :slight_smile:

i write the code but it seems it doesnt work.

No data label column, row seem on the excel.

i downloaded the code into the arduino and there is no problem with compiling the program.

int SensorValue = A0 ;

int row = 0 ;

void setup() {

Serial.begin(128000) ;// Opens serial port , set data rate to 9600 bps

Serial.println("CLEARDATA " );

Serial.println("LABEL,TIME,LDR_Read");// put your setup code here, to run once:

}

void loop() {

int AnalogReading = analogRead(SensorValue);// read the input on analog pin 0:

float voltage = AnalogReading * (5.0 / 1023.0);// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):

Serial.print("DATA , TIME , ");

Serial.println(voltage);

row++ ;

AnalogReading ++;

voltage ++;

delay (100);

// wait 2 miliseconds before the next loop for the ADC to settle after the last reading.

}