/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the Serial Monitor. Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. https://docs.arduino.cc/built-in-examples/basics/AnalogReadSerial/ */ const int sensorPin1 = A0; const int sensorPin2 = A1; const int sensorPin3 = A2; const int sensorPin4 = A3; // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { int sensorValue1 = analogRead(sensorPin1); int sensorValue2 = analogRead(sensorPin2); int sensorValue3 = analogRead(sensorPin3); int sensorValue4 = analogRead(sensorPin4); Serial.print(sensorValue1); Serial.print(","); Serial.print(sensorValue2); Serial.print(","); Serial.print(sensorValue3); Serial.print(","); Serial.println(sensorValue4); // newline ends packet delay(200); // much smaller delay }