Reading the output of a transistor

I thought of doing a common emitter with INPUT_PULLUP (like the below) but it doesn't appear to be working.

That is right, if it is not working you have not wired it like you think you have. Maybe a bad connection,