Decided to try one more time with VS/PlatformIo, must have something to do with the way code is written using it on a Mac but not sure. I copied your code using the raw copy and loaded all libraries that was needed. I get an error on line 100
“outputState”was not declared in this scope line [100 col , 31]
What code are you using exactly?
In VS Code all function declarations must be made before the function call.
You need to move all user-defined functions to a place before the setup().
I hope this helps.