from machine import Pin, ADC , I2C
from ssd1306 import SSD1306_I2C
import time
from time import sleep
#OLED config
WIDTH =128
HEIGHT= 64
i2c=I2C(0,scl=Pin(1),sda=Pin(0),freq=200000)
oled = SSD1306_I2C(WIDTH,HEIGHT,i2c)
volt = 3.30
lux = 50.00
while True:
oled.fill(0)
oled.text("Reporting...",15,0)
oled.text('Volt: %.2f V'%volt, 0,15)
oled.text("Light:%.2f " %lux + "%", 0, 30)
oled.show()
time.sleep(2)