use the teensy 3.3v as pull-up on 6n137. See https://electronics.stackexchange.com/questions/317622/how-to-get-3-3v-output-from-vishay-6n137-high-speed-opto-coupler