Made blinking work, but I need to fine tune the timeing stuff. Also
there's probably a better way to do the statemachine but I kind of
brute-forced it.