Good morning, and thanks for yours.
I had the whole code working with UNO and LCD using internal A/D but found that the display wobbled around too much, viz. input to display (say) 20.00V would bounce between 20.30 to 19.40 and everything in between. I put this down to the D/A sampling and tried to average but eventually decided that the 12-bit D/A should solve that, i.e. discarding the LSB (or 2). So I bought the board and added the program to my sketch. Clearly I mismatched the code, winding up with my messy ‘total’ sketch.
With hindsight, I should have made this clearer to begin with.
I will go back to the tutorials to find the mistakes. I just jumped in at the deep end because I was/am eager to get the project to fly.
Thank you for your help and advice.
I will reply later after learning up some more.