Hi, I am working on a Arduino project for my motorcycle. I want to be able to check if a switch located inside the engine is on or off. Will it work to wire it up as shown below, and use analogRead() with INPUT_PULLUP on the Arduino to determine if the switch is open or closed?
Since the switch is on the 12V part of the circuit, do i need a resistor / voltage divider between the Arduino and the switch, or will this just work because the Arduino is powered through the DC-DC step down?
I am using an Arduino Nano, and this is the DC-DC step down I have planned to use: 5PCS Ultra-Small Size DC-DC Step Down Power Supply Module 3A for Arduino | eBay