Olli Graf
1 year ago
3 changed files with 9 additions and 43 deletions
@ -0,0 +1,4 @@ |
|||
db.ini |
|||
*.bak |
|||
LCD1602.py |
|||
__pycache__ |
@ -1,40 +0,0 @@ |
|||
#!/usr/bin/env python3 |
|||
# encoding: utf-8 |
|||
|
|||
import time |
|||
import configparser |
|||
import logging |
|||
import LCD1602 |
|||
try: |
|||
import smbus2 |
|||
except ImportError: # Wenn smbus2 nicht zu importieren ist, nehmen wir smbus |
|||
from smbus import SMBus |
|||
import mysql.connector |
|||
|
|||
port = 1 |
|||
adresse_lcd1602 = 0x25 |
|||
deg = 0o1212 |
|||
|
|||
logging.basicConfig( format='%(asctime)s [%(levelname)s] %(funcName)s: %(message)s', level=logging.DEBUG) |
|||
|
|||
|
|||
def info(msg): |
|||
logging.info(msg) |
|||
|
|||
def debug(msg): |
|||
logging.debug(msg) |
|||
|
|||
def print_weather(): |
|||
lcd.setCursor(0, 0) |
|||
lcd.printout('0o{0:o}'.format(deg)) |
|||
|
|||
|
|||
#LCD1602 initialisieren |
|||
lcd=LCD1602.LCD1602(16,2) |
|||
|
|||
try: |
|||
while True: |
|||
print_weather() |
|||
except(KeyboardInterrupt): |
|||
lcd.clear() |
|||
|
Loading…
Reference in new issue