Before solving this problem, I need to remind you, never mind, int a =1.2; How to define integer variables to assign floating-point numbers? I think this is human error. To get to the point, displaying a variable on 12864 LCD does not need to modify many programs, but only needs to change the data format in the write data function, and the format is defined as writeByte(a/ 10+'0'). This is the number of ten digits showing a, and each digit only needs to be changed into%.
I hope my answer can help you.