SFML + Arduino

Hello all. Im trying to build a project. I have created SFML window with a rectangular block at the center. For the hardware, I would like to use an Arduino board and a Potentiometer. I would like to record angle values from potentiometer and feed this to the setRotation in SFML. By this, I want the rectangular block to rotate according to the position of the potentionmeter. Please help. Thank you.