If it’s just numbers and letters, you may be able to get it to work by speaking them, as @beachb has suggested. You’d have a little more trouble if you included punctuation.
If speaking the passcode doesn’t work, do you by any chance have access to a USB keyboard? (Like a full-size keyboard for a computer). With a USB OTG adapter, you could connect the keyboard to the phone and type your passcode. If you don’t have a place nearby where you can pick up a USB OTG adapter, I can send you one. It sounds like you can still answer calls on the phone, and you could keep up with text messages from a computer using Republic Anywhere until you regain access to the phone.
If there’s a Best Buy near you, this is the item I’m describing: