I am working on sensor data acquisition with Mega.
I have two different system to get the sensor data, Arduino mega and company provided software for the sensor.
The company provided software takes the data every second.
I just did basic loop for analog input and set the delay 1 sec for Mega.
The problem is that, at the beginning the data is acquired at the same time by the two system
but as time goes, it seems like there is a huge delay for Arduion Mega.
So that the data taken by Mega is completed shifted not matching with the data taken by company provided software.
I attached the picture of the graph.
Blue is data from the software and orange one is from Arduino…
So I kinda want to see the exact moment when Arduino takes the data…
Like using reference clock and see when Arduino takes the data when I set the delay 1 sec.
Is it possible or way to do it?
Can I use arduino 16MHz system clock and find out exact moment or time when the data is taken?
I am not sure I explained properly but basically I want to know why there is a huge shift on the graph.
Please help me with this problem, any advice would be great.