I have a project where I need to log data on a file on a computer, which is connected to an arduino, which will read sensors.
I played around with reading the serial port using python. The Arduino just does a loop where it increments a variable by one, and prints the variables' value to the serial port. But, when I read the data from the port in python, the data I get is old(from before the python program even started). Also, when I start the python program again, it starts with the old data (i.e. 1,2,3,4...). Python has no built-in way to read serial ports, so I installed PySerial[URL].
Yeah I know sorry, but I have had a change of plan. The main program is on the computer, and it periodically tells the arduino to send back certain data, and it does so. Its going along much better this time