ESP32-C3 Mini OLED with BMP180 or other I2C sensors

This esp32 OLED screen uses i2C to display , if you want to use another I2C sensor with OLED display you must find sensors address and OLED’s adress for I2C, this code will help you, it’s working code, to find i2c sensors adress use google, for exenple, to find BMP180 search bmp180 i2c adress keywords, for ESP32-C3 Mini OLED’s i2C adress esp32-c3 oled display i2c adress keyword :slight_smile:

most important lines are, address: 0x77 and address: 0x3C others are standart settings, and you must be connect BMP180’s SDA to GPIO5, SCL to GPIO6, oled display olso connected on board with the same pins

time:
  - platform: sntp
    id: sntp_time  
    timezone:  "<+03>-3"    
 

i2c:  
  - id: bus_i2c
    sda: GPIO5
    scl: GPIO6
    scan: true
    frequency: 800kHz

sensor:
  - platform: bmp085
    id: bmp_sens
    i2c_id: bus_i2c  
    address: 0x77  

    temperature:
      name: "Temperature"
      device_class: temperature
      accuracy_decimals: 0  
      id: bmp_temp
      icon: mdi:home-thermometer-outline
 
    pressure:
      name: "Pressure"
      icon: mdi:gauge 
      device_class: atmospheric_pressure
      accuracy_decimals: 0
      id: atm_press
 
  - platform: template
    name: "Altitude"
    lambda: |-
      return (  44330 * (1.0 - pow(id(atm_press).state / 1016.0, 0.1903) ) );
    unit_of_measurement: "m"
    accuracy_decimals: 0  
    id: sea_levell_alt
    icon: mdi:altimeter
    device_class: distance

  - platform: wifi_signal  
    name: "WiFi strength"
    filters:
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
      - sliding_window_moving_average: 
          window_size: 15
          send_every: 1

    unit_of_measurement: " %"
    entity_category: diagnostic
    device_class: signal_strength
    icon: mdi:wifi
    update_interval:  1s
    id: wifi_strength
 
 
display:
  - platform: ssd1306_i2c
    i2c_id: bus_i2c   
    address: 0x3C    

    id: ssd1306_display
    model: "SSD1306 72x40"
    rotation: 0
    contrast: 90%
    update_interval: 1s
    lambda: |-
 
      if (id(wifi_strength).state >0){         
            if (id(sntp_time).now().second % 5 == 0) {
                it.print(15, 0, id(font2), "TIME");
                it.strftime(4, 8, id(font1), "%H.%M", id(sntp_time).now());
                it.strftime(10, 27, id(font2), "%d/%m/%y",id(sntp_time).now());                
            }          
            else
            {   
                char array[5];
                sprintf(array, "%.0f", id(bmp_temp).state);
                it.print(22, 0, id(font2), "WiFi");
                it.print(20, 8, id(font1), array);
            }
    }      

font:
  - file: "gfonts://Silkscreen"
    id: font1
    size: 20
  - file: "gfonts://Roboto"
    id: font2
    size: 13