ASSOCIATED CONTENT
Supporting Information
Source code and it’s explanation for implementing PLX-DAQ for your Arduino-based device
and it’s source code.
Source Code Explanation
void setup() { Initializing Arduino device.
Serial.begin(9600); Opening the serial communication. The number
sets the bauderate ( = Symbols sent per second).
The same bauderate must be set in PLX-DAQ
starting window.
Serial.println("CLEARDATA"); Enabling the “Clear Columns” option of the
interface.
Serial.println("LABEL,Time,Variable a, Writing “LABEL” and Excel will set the
Variable b,..."); description of the columns.
Serial.println("RESETTIMER"); Enabling the “Reset Timer” option of the
} interface. PLX-DAQ is always measuring time,
while serial communication is enabled. For
enabling the communication use “Connect”. In
doing so the serial port will open.
void loop() { Initializing Arduino device’s routine.
Serial.print("DATA,TIME,"); Writing “DATA” and Excel will print the time
since the serial port is open and the
Serial.print(Variablea); measurements of variable (e.g. pH, temperature,
conductivity…) per cell.
Serial.print(Variableb);
Serial.println(); Setting a new line for a new row in Excel.
delay(1000); Put a delay (here 1000 ms) according to your
} sensor(s) and their response time.