'pyfirmata' module works fine on macOs and Linux, and we tested that; while it might have a glitch with Windows. If you find the same- use 'pymata4' module instead, just used in this code as well.
'fval' remains high throughout the active readout and returns lown between the frames.