From d9ef4a6167bda60cf63932990a6cd593199b3e3f Mon Sep 17 00:00:00 2001 From: bton Date: Fri, 12 Apr 2024 21:54:36 +0200 Subject: [PATCH] test --- oled.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/oled.py b/oled.py index 2e8505a..6d0bc50 100644 --- a/oled.py +++ b/oled.py @@ -9,17 +9,10 @@ def clear(): display.fill(0) display.show() -def Balance(user_id, user_name, balance): - if balance < 10: - position_x = 50 - elif balance >= 10 and balance < 100: - position_x = 30 - elif balance >= 100 and balance < 1000: - position_x = 10 +def Balance(user_name, balance): clear() - display.text(str(user_id), 0, 0, (255,255,255), size=1) display.text(str(user_name), 50, 0, (255,255,255), size=1) - display.text(str(balance), 0, 10, (255,255,255), size=1) + display.text(str(balance), 0, 20, (255,255,255), size=2) display.show() if __name__ == "__main__":