/* AnalogReadSerial Reads an analog input on pin, prints the result to the Serial Monitor. Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). This example code is in the public domain. */ // 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 sensorValue_N = analogRead(D3); int sensorValue_E = analogRead(D2); int sensorValue_W = analogRead(D1); int sensorValue_S = analogRead(D0); sensorValue_N = map(sensorValue_N, 0, 1024, 1024, 0); sensorValue_E = map(sensorValue_E, 0, 1024, 1024, 0); sensorValue_W = map(sensorValue_W, 0, 1024, 1024, 0); sensorValue_S = map(sensorValue_S, 0, 1024, 1024, 0); // 🔁 Send just numbers Serial.print(sensorValue_N); Serial.print(","); Serial.print(sensorValue_E); Serial.print(","); Serial.print(sensorValue_W); Serial.print(","); Serial.println(sensorValue_S); // ends with newline delay(500); }