Arduino AnalogWrite (pwm) to DC convertor.
pwm 10% gives 0,5 V DC and pwm 90% gives 4,5 V dc
Change the dutycycle and see the effect
pwm frequency = 500 Hz
The Vcc of the opamp must be at least 8 volt to use the full range from 0 to 5 volt.
Use the Vin on the Arduino board to power the opamp. Vdd = 0 volt.