# 
# install python 2.7
# install pyserial http://sourceforge.net/projects/pyserial/files/pyserial/2.5/pyserial-2.5.win32.exe/download

import serial
import time
ser = serial.Serial(port='COM11', baudrate=9600, timeout=0)
def ser_command (v):
    ser.write(v + '\n')

ser_command('/PwmOut/new LED1 blue') # turn on
ser_command('/blue/write 1') # turn off
ser_command('/blue/write 0.98') # dimm 
ser_command('/blue/read')
ser_command('/blue/read')
ser_command('/blue/read')
ser_command('/blue/read')
ser_command('/blue/read')
ser_command('/blue/read')


for i in range(100):
    time.sleep(0.1)
    ser.write('/blue/write '+ str(i/100.0) + '\n')
    print(i/100.0)
