If it is, that would create a fine digital output. Use the input pin with internal pullup connected to pin 1, pin 2 to Gnd.
When current flows thru the LED, the transistor turns on & pulls the pin low.
If it is, that would create a fine digital output. Use the input pin with internal pullup connected to pin 1, pin 2 to Gnd.
When current flows thru the LED, the transistor turns on & pulls the pin low.