Optismart sensor pinout is as follows
pin 1 = pulse input, extremely high impedance. Pull low for the duration of the meter LED’s flash to register a pulse. Requires external pull-up resistor.
pin 2 = battery + output via internal 10k safety resistor
pin 3 = +ve pulse train direct out from MCU pin. Lights the indicator LED on the optical pick-up. This LED must have an external series resistor.
pin 4 = GND