time taken to collect two samples
116 us
shiftvalue = V2 -V1/116us
for (int i ;i=172;i++){
TimeA =micros();
data[i]=anlogReading(A0);
TimeB[i]=micros()-TimeA;
}
for (int i ;i=172;i++){
Phase[i] = data[i]-data[i-1]/TimeB[i];
# Need to find phase shift of each values
# to keep constant value to phase we need to add some corrective value to the main value
# How to get phase value
# Normally to cover 360 deg it take 20 ms
if add each value of Phase to complete 360 deg , time taken , are equivalent to 20 ms then same in the correct track . to adjust need to add some corrective values to each phase to get close to main value .
}
Simple way of getting sample value
# This can be in Setup()
for (int i ;i=10;i++){
TimeA =micros();
data=anlogReading(A0);
TimeB[i]=micros()-TimeA;
}
for (int i ;i=0.02*1000/(Average Of TimeB[]);i++){
TimeA =micros();
data[i]=anlogReading(A0);
TimeB[i]=micros()-TimeA;
}
116 us
shiftvalue = V2 -V1/116us
for (int i ;i=172;i++){
TimeA =micros();
data[i]=anlogReading(A0);
TimeB[i]=micros()-TimeA;
}
for (int i ;i=172;i++){
Phase[i] = data[i]-data[i-1]/TimeB[i];
# Need to find phase shift of each values
# to keep constant value to phase we need to add some corrective value to the main value
# How to get phase value
# Normally to cover 360 deg it take 20 ms
if add each value of Phase to complete 360 deg , time taken , are equivalent to 20 ms then same in the correct track . to adjust need to add some corrective values to each phase to get close to main value .
}
Simple way of getting sample value
# This can be in Setup()
for (int i ;i=10;i++){
TimeA =micros();
data=anlogReading(A0);
TimeB[i]=micros()-TimeA;
}
for (int i ;i=0.02*1000/(Average Of TimeB[]);i++){
TimeA =micros();
data[i]=anlogReading(A0);
TimeB[i]=micros()-TimeA;
}