Why does my Arduino Nano send the wrong voltage on a digital output PIN?
The microcontoller in an Arduino operates on 5 Volts (or perhaps 3.3 Volts).  An on-board voltage regulator reduces the 12 Volt input to 5 volts for the ICs on the board.

Connecting the pull-up resistor (R1 in your drawing) to 12 Volts may damage the microcontroller (especially if it is really 100 Ohms as your drawing shows).  The pullup resistor must be connected to the 5 Volt pin on the Arduino board.

The output voltage of an Arduino pin should be near 5 Volts, but may be less if you place a heavy (high-current) load on it.