Measuring Current/Voltage with arduino ?

You want the smallest possible resistor for measuring the current, but as the resistor gets smaller the accuracy drops. If you use a 1 ohm resistor then each unit of analogRead of the pin connected to the current sensing resistor is around 5ma. A 5.1 ohms resistor gives around 1ma for each unit of analogRead.

OK, so i've got something setup on my breadboard. From the calculations I should be reading 25.5 mA. I used a 4.7 ohms resistor for measuring the voltage from. At the moment the arduino board analog reading is jumping between 23 and 24, which is pretty damn close. How did you calculate that 5.1 ohms will give you around 1ma for each unit read. ie. how can I convert that value to get an even more accurate value. I'm guessing that using precision resistors will give me an even more accurate value ?

thanks for all the help so far everybody, I really appreciate it.