digital switch

I need to make a digital switch with arduino uno. My senario is as followes, I a 4.5v power supply comming from the ECM of my truck I currently have a 5 possition rotary switch as my switch for changing my voltages right now. This is my idea. I have five resistors 2.2k, 5.6k, 270 ohm, 1k, 27k wired like this to my arduino

see the picture below.

I want the power source coming from my truck to be regulated via digital switch by my arduino. When I push the up button I want the aduino to divert the voltage coming from my truck through the one resistor at a time for every time I push the up button. Then cycle down through the resistors one at a time per times i push the down button. my question is… did I wire it correctly to do so and will the code for this be difficult to write??

What are you trying to accomplish? The voltage in from the truck can't be routed out by the Arduino. Even if it could, running the voltage through various resistors would simply change the current draw, not the voltage.

Ok the purpose of this is performance changing of my truck. There are 5 files stored on the ECM of my truck, in order to tell the ECM which file to read the ECM has an output pin and a ground pin on it in order to wire up a switch to put resistance between the power wire and ground. The resistances required to accomplish this are 2.2k,27k,270 ohms,5.6k and 1k. It is very easy to do this with a rotary switch but I want to utilize two push button switches to do change the files instead (one for up and one for down) so you're telling me my arduino cant do this?

This can be accomplished with NPN or n-channel transistors as switches, each having the relevant resistor connected to its collector (or drain).

How exactly would I do it with an npn transistor? would I still be able to use my arduino to control it?