stuff
This commit is contained in:
parent
67fd7308da
commit
b8eb657dc2
2 changed files with 8 additions and 1 deletions
7
LCD.py
7
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
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue