My program on the GitHub - https://github.com/LightningWalrus/ATmega328-programs/tree/master/Lightmeter
I've made a program which consists of two parts. The C part which takes ADC value and sends it to the computer via serial connection. And the python part which receives the value and stores it in the txt file as shown in the file Example one.txt.
My problem is when I change the python code to read the txt file for the existing values first and add new values then, it stores values in this weird way as shown in the Example two.txt.
How do I make it read the existing values first and add new values so they display correctly like in the Example one.txt ?