Need help on how to approch 12v digital read on a blinking signal

sorry bout that optoisolator, don't know what i was thinking