Yes its very possible to add a control box to this Hansastro Moonlite protocol focuser. however the fact that you are asking the question may mean that its not so easy for you. I say this because from the code it is self evident that such an enhancement is possible if you have Arduino coding experience. If you do not then this is a good time to learn.
I am assuming you want to add this control box to a system that is connected to Indi/EKOS.
Moonlite protocol commands are defined in this
Moonlite Guide
:
The code in the Hansastro version loops round waiting for a command from the serial port in the form :command# such as :SN0200# which sets the new position at 0200 (hex).
To modify the code you would need to include within the loop some code that checked if the the switch (either in or out) was being pressed and if so issue the appropriate command set.
Things like writing code loops testing for a switch to be open or closed, are standard Arduino techniques and you should master them first on a simple system, rather than try and modify the code. So for example write a simple system that lights a blue led if one switch is pressed or a red one if another is pressed.
Alternatively you will see that within the focus module you can just press a software button for in or out.
If however you just want a stand alone manual/electric focuser then you should just write a "simple stepper motor control program in Arduino" a search for the text in quotes will give you lots of examples.
On the the motor front, beware of lightweight stepper motors, they will not hold focus. The Nema17 is rock solid when under power or not.
Best of luck
Max