back in the March 2021 edition of ME I described how to make a rotary encoder based DRO for the tailstock, and several people asked for the code. One at least has got it working, but not without issues. Following advice from Silly Old Duffer, there are 2 issues
Firstly I forgot to mention in the article that you have to download the TM1638plus library. Instructions on how to do this are given in lib
They have changed this library between my installing it and now, so my code needs changing a bit. Right at the top are 3 lines which say
#include <TM1638plus.h>
#include <TM1638plus_font.h>
#include <TM1638plus.h>
delete the second 2 lines so it just says
#include <TM1638plus.h>
This may still not be enough, it appears there are some old stock Arduinos out there which the modern compiler will not deal with. If you get a message like
avrdude: stk500_recv(): programmer is not responding
then that is your problem. To cure it go to Tools->board and select Arduino nano. Then go to tools->processor and select ATmega328P(OldBootloader)
If you still have issues let me know and I'll try to sort it.
Mine worked pretty much out of the box