import smbus
import time
bus = smbus.SMBus(1)

address = 0x04

global number 
global var 

def writeNumber(value):
    bus.write_byte(address,value)
    return -1
1
def readNumber():
    number = bus.read_byte(address)
    return number

while True:
    
    var = input("Entfernung zwischen 1 und 200 = 2800 bis 3000 fuer weise Raeder 2900 bis 3100 fuer schwarze : ")
    if not var:
        continue
    
    writeNumber(var)
    time.sleep(1)
    number = readNumber()
    number = readNumber()
    print number
    print