Did you mean optoisolator?
Here's a couple of ways.
pinMode (inputPin, INPUT);
digitalWrite (inputPin, HIGH); // turns on internal pullup
// With 2 resistors, look for a High to indicate blinker is on:
if (digitalRead (inputPin) == HIGH){
// do code for on
}
else {
// do code for off
}
// with transistors, Blinker On will bring the pin low
if (digitalRead (inputPin) == LOW){
// do code for on
}
else{
// do code for off
}
