Using an op amp as a voltage comparator

You don’t have a voltage divider as shown on pins 2/6 and you sure as heck wouldn’t want 60 ohms in that circircuit as a voltage divider. 2k at least or higher would be fine, there is no current required. You’ll also not get 12 volts out with 12 volts supply on ‘358 as it is not a “rail to rail” opamp, it’s a 30 plus year old design. I suspect you’ve exceeded the current limit abilities of the opamp which is why the voltage is low. Honestly, there’s not enough detail provided to know for sure but I doubt it matters at this point.

You don’t need or want the opamp at all for digital voltage level translation, you can do it with transistors as you’ve found but your schematic lacks base resistors for current limiting, hopefully you have them otherwise you’re going to kill your Arduino.