Arduino Ammeter

Didn't understand the working of the second circuit but what value of inductor should I use in the first method? And at what frequency should I sample the voltage levels?