I would recommend writing motor control code that implements the Easycomm protocol
Then, you use rotctld (part of hamlib) which talks to your rotor controller and provides an IP based interface for control. gpredict can speak to this interface (as can the satnogs client itself).
Now, all that said, we already have an open source arduino based rotator controller that works with A4988s and Nema 17's. You're free to use and modify this for your needs. The code for this controller implements that easycomm protocol, so when you plug it in to a linux machine, you would use rotctld to speak to it and provide the IP interface. You can find details on that controller here: https://wiki.satnogs.org/SatNOGS_Rotator_Controller The hardware design and firmware is all open source.