You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
700 B

1 year ago
#!/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()