Hi,
I have posted my amended code on Github:
github.com/mdobres/MaxFocuser
The changes I made were:
-Initialise steps as eigths so that initial setting works
-Changed temp sensor to pin A0, in the original code it was pin 3, which was already in use
-Added temp correct factor to allow temperature range to be corrected, 10k pot seems unnecessary and I disconnected it in my final version
-Note that I2C display should be connected to I2C: A4 (SDA) and A5 (SCL)
The easiest way to test this is to wire the whole thing on a breadboard then connect using the Arduino serial monitor and issue Moonlite commands, referenced in the Readme file.
I got this to work from Arduino PDE under windows and then under indy Ekos, but I couldn't get it to work with the windows Moonlite focuser program I downloaded from their site. Probably due to something to do with Nano drivers which changed at some point. But I only need it under Indy so didn't spend any time trying to solve it. If you need it to run under windows you may want to use an Arduino UNO and use the original code with the A0 correction. I prefer the nano, it is more compact fits nicely on a small breadboard and is really cheap.
Choice of stepper motor is key, I used: a Nema 17 Stepper motor SM-42BYG011-25 about £15 , I see some people try and use the little 28BYJ-48 motors which cost less than £2 and get problems with holding and backlash. The Nema 17 I used (there are lots of different ones) has great torque and holding but is quite light.
As far as fixing the motor to the telescope I used three components:
-Rubber Lined Munsen Rings Bracket plus M10 20mm bolt
-Nema 17 stepper motor mounting plate
-Flexible shaft coupling joint to match diameter of motor shaft and focuser shaft. Mine were 4mm and 5mm.
You can see how its fixed in my last set of photos. The Munsen ring (picture attached) goes round the telescope and has a post sticking out to which you bolt the mounting plate. You will probably need to drill a hole in the plate for the M10 bolt. Then with careful positioning the shaft coupling joint just joins the motor shaft to the focus wheel shaft,
Best of luck
Max