Arduino Print Analog Sensor Input to Serial Monitor

Need to Specify the serial input
Start the serial connection
Print input to log

// Set analog pin variable
const int aPin = A0;

void setup() {
  // Start Serial connection
  Serial.begin(9600);
}

void loop() {
  // Print analog input to Serial Monitor
  Serial.println(analogRead(aPin));
}

Leave a Reply

Your email address will not be published. Required fields are marked *