Getting continuous ratings during a video using a Serial Slider?


I’m trying to set-up an eye-tracking experiment where participants provide continuous beauty ratings while watching a video. In order to keep their gaze focused on the video and not an additional slider on screen, I want to use a serial (physical) slider.

I’m new to Python and PsychoPy, so I am wondering how I would go about modifying the code for the interactive slider demo posted here which can collect continuous ratings, to take the data from the serial instead of the position of the slider on the screen.

Any help is appreciated!