Fixed loop for blinking light

Problem with loop in python code, simplified to work from terminal.