#include // we only need this if we are in PlatformIO void setup() { // initialize serial communication // over the USB wire back to our computer Serial.begin( 9600 ); while(!Serial) ; // define which pins in our sketch // will be used as inputs and which as outputs pinMode(A2, INPUT); } void loop() { // read sensor value from pin int reading = analogRead(A2); // print it our as text over the serial wire so // that we can see it on our monitor Serial.print( reading ); }