This is the starting point for writing encoder-sim in C++ instead of arduino.