Measuring voltage

How To measure voltage and output that same amount of voltage being given with an arduino, or a low powered arduino alternative? Thanks

Measure using an analogue input (analogueRead) - store in a variable. Output that to the PWM (analogueWrite), however, note the PWM output will not be a DC voltage but you can use a simple RC low pass filter to smooth it to DC.