The project has been finished but there is some optimizations. I have almost ran out of the IO pins of the stm32 bluepill board. Now i have an idea that to determine the state of seven segments we don’t have to use all of the 7 pins of a segment. If we omit the c and d segments, we can still determine the state from 0 to 9 of the segment. This releases a lot of pins (total of 6 IO pins as there are three full segments on the LCD). It turns out that this optimization works.
I will update the github repo after the optimization done.