SparkFun Opto-isolator Breakout - use in reverse with 12v input driving arduino input pin?

https://www.sparkfun.com/products/9118

Many of the examples I have seen with opto-isolators use the arduino low voltage driving an output that is opto isolated. The 5v or 3.7v on the input side and the V-high on the output side.

Can this device be used in reverse where I have a 12v remote (100 ft or so) NO switch being used to detect a button press and that be isolated to a clean 3.5v or 5v input on the arduino side?

https://i.imgur.com/DqCSpRO.jpg

I’m thinking maybe something like this

https://www.amazon.com/24V-Optocoupler- … 767S8?th=1

or

https://www.ebay.com/itm/12V-24V-to-5V- … rk:18:pf:0

Are there any SparkFun equivalents?

Sure. Per the data sheet, the typical forward drop for the LED in the opto is 1.2v. At 5V in, with a 240 ohm resistor, the current is (5-1.2)/240 = 16mA. At 12V in, for the same current, the resistor would be (12-1.2)/0.016 = 675 ohms. Nearest standard 1% resistor is 681 ohms. Power dissipation is I^2*R = (0.016)^2 * 681 = 174mW so I would use a 0.25W resistor.

/mike