That code is not designed to run on the esp32. Running serial on an esp32 chip does not really make sense in terms of driving a focuser.

You do understand that the myFocuserPro2 has already been updated to the next generation using an ESP8266 or ESP32 chip, giving all the features of Bluetooth (ESP32), WiFi, ASCOM REMOTE and a host of other features, options.

sourceforge.net/projects/myfocuserpro2-esp32/

Regards
Robert

Read More...