Implemented blink function

@afeld Please review and merge when ready