PWM LM2596 buck converter?

Instead of potentiometer use analog output from aurdino.
0V = hight output voltage (depends of R1 and R2)
1,23 volt from aurdino = 0volt out

2596.jpg