Copy value of A0 to const char text[] = " int sensorValue";

Sorry I am an old man with interest in the Arduino.
I would like to show the value of A0 to the display UNO R4, but how do I convert an int to text ?

Serial.println(pinA0); substitute pinAo with your variable name for the pin.

To display the integer value corresponding to the voltage present on pin A0, use

Serial.println(analogRead(A0));

Perfect. It works. Thank you very much.

In this wokwi simulation (a web site to practice coding with Arduino) you can see how to show analog readings in text, and represent them as a "trace"

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.