from machine import Pin,PWM,SoftI2C
from ssd1306 import SSD1306_I2C
import time

i2c = SoftI2C(sad = Pin(12),scl = Pin(14))
oled = SSD1306_I2C(128,64,i2c,addr=0x3c)
beep = PWM(Pin(0),freq = 1,duty = 128)

while 1:
    def mybeep(music_value,freq_value):
        oled.fill(0)
        oled.text(str(music_value),64,32)
        oled.show()
        beep.freq(music_value)
        time