In the setup() function, you'll need to add a line:
pinMode(A2, INPUT);
which sets up the pin to serve as an analog input. Before connecting the circuit to the Nano, I'd measure that max voltage that you're seeing on the output of your circuit. The analog pins on the Nano are 5V max, and that feeds a 10-bit ADC, so the max granularity is 0-1023. If that value exceeds 5V, you'll need to use a voltage divider to get it within range. Once you know the max voltage, you can use the map() function to control the reading. The in loop(), you'd have something like:
void loop() {
? ?int value, displayValue;
? ?value = analogRead(A2);
? ?displayValue = map(value, 0, 1023, 0, 100);
? ?// additional code...
}
This code would display the value read on pin A2 with a range limit of 0 to 100. ??
Now I am not that clever with the codes for the raduino and find it very difficult to add this or that and not knowing where in the program to put said new snip of code.
Sorry if this has been covered before but I am struggling with this.