From b8eb657dc22b40df256045a4df6b160da7c5997e Mon Sep 17 00:00:00 2001 From: Benjamin Tayehanpour Date: Sat, 3 Oct 2026 15:24:28 +0000 Subject: [PATCH] stuff --- LCD.py | 7 +++++++ animation.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/LCD.py b/LCD.py index d788496..f304dfe 100644 --- a/LCD.py +++ b/LCD.py @@ -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 diff --git a/animation.py b/animation.py index de2e51a..6a6489f 100644 --- a/animation.py +++ b/animation.py @@ -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):