from machine import Pin, I2C
import ssd1306
from home_icon import icon24 # ✅ importamos el icono limpio
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
oled.fill(0)
def draw_icon24(oled, x0, y0, data):
idx = 0
for y in range(24):
for byte in range(3):
b = data[idx]
idx += 1
for bit in range(8):
px = byte * 8 + bit
if px >= 24:
break
if b & (1 << (7-bit)):
oled.pixel(x0 + px, y0 + y, 1)
# Mostrar icono izquierda + HOME derecha
draw_icon24(oled, 2, 18, icon24)
oled.text("HOME", 40, 28)
oled.show()