
from Arduino import Arduino

ard = Arduino('COM3',[4,4])
RAPPORT = 0
TENSION = 1
while True:
    r = input('?')
    if r=='n': break
    elif r=="v":
        Vs = ard.read_float(TENSION)
        print("Vs = %f"%Vs)
    else:
        rapport = float(r)
        ard.write_float(RAPPORT,rapport)
ard.close()

             