This commit is contained in:
Benjamin Tayehanpour 2026-09-26 21:30:00 +00:00
parent 8df4d810cc
commit 796b37bff6
2 changed files with 4 additions and 3 deletions

View file

@ -11,9 +11,9 @@ class display:
async def redraw(self, row = None): async def redraw(self, row = None):
if row == None: if row == None:
for row, line in enumerate(self.contents): for row, line in enumerate(self.contents):
await self.device.async_message(line, row + 1) await self.device.async_message(line, row)
else: else:
await self.device.async_message(self.contents[row], row + 1) await self.device.async_message(self.contents[row], row)
async def read(self, row): async def read(self, row):
return self.contents[row] return self.contents[row]

View file

@ -11,7 +11,8 @@ def wheel_handler(dir):
def button_test(*args): def button_test(*args):
print(args) print(args)
disp.write(2, args) loop = asyncio.get_event_loop()
loop.create_task(disp.write(1, args))
async def main(): async def main():
pi = asyncpio.pi() pi = asyncpio.pi()