#include #include #include #include #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); const int Analog_channel_pin= 15; int ADC_VALUE = 0; int voltage_value = 0; void setup() { Serial.begin(115200); // initialize with the I2C addr 0x3C display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Clear the buffer. display.clearDisplay(); // Display Text display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(0,28); display.println(Analog_channel_pin); display.println("Temp.:"); display.display(); delay(2000); display.clearDisplay(); } void loop() { ADC_VALUE = analogRead(Analog_channel_pin); Serial.print("ADC VALUE = "); Serial.println(ADC_VALUE); delay(1000); voltage_value = (ADC_VALUE * 3.3 ) / (4095); Serial.print("Voltage = "); Serial.print(voltage_value); Serial.print("volts"); delay(1000); }