DHT controlled stepper motor

Yeah I know, I would like to consolidate somehow to be transparent and more efficient, but don't know which way could be the best of coding this concept. Could you help me at least with an example if you have? I tried to find examples when DHT controlles motors but for stepper I have not found anything. That is the reason why I turned to this forum for support. If I have a better knowledge about the framework what should be used, then I can extend it with my ideas.