This commit is contained in:
Benjamin Tayehanpour 2026-10-03 15:24:28 +00:00
parent 67fd7308da
commit b8eb657dc2
2 changed files with 8 additions and 1 deletions

7
LCD.py
View file

@ -56,6 +56,13 @@ class LCD:
for row in bitmap:
self.lcd_byte(row, 1)
async def async_set_char(self, address, bitmap):
async with lock:
address = address * 8 + 0x40
self.lcd_byte(address, 0)
for row in bitmap:
self.lcd_byte(row, 1)
def lcd_byte(self, bits, mode):
# Send byte to data pins
# bits = data

View file

@ -152,7 +152,7 @@ class animator:
self.running = True
while self.running:
for slide in self.slides:
self.lcd.set_char(self.slot, slide)
await self.lcd.async_set_char(self.slot, slide)
await asyncio.sleep(self.delay)
async def stop(self):