Separate voltage and current from regulated DC power supply
As alluded to in the comments, your code implicitly assumes both a voltage representing the load voltage and a voltage representing the load current.

Assuming that the load voltage is less than the UNO input maximum, your circuit can look like 







simulate this circuit &ndash; Schematic created using CircuitLab

If you make RSense at least 100 times smaller than RLoad, the error introduced will to "Voltage" will be less than 1%. This means, of course, that you wil have to pick R3 and R4 to give adequate gain so that "Current" is usable small. You will also have to keep careful track of stray ground resistances so that you correctly read the current-induced voltage, since RSense will be small and small errors in the ground resistance will make a difference.

If it is important to you that your load be grounded, then 







simulate this circuit

is what you want. Note that the op amp is replaced with a differential amp with a fixed, known gain. The biggest problem that you will probably face is that the load voltage may well be too high for the UNO, and this will also cause problems with providing appropriate supply voltages to the diff amp so that you don't overdrive the inputs (common mode voltage too high).