The "ADC_Dual_Mode" example is configured to process the buffer every millisecond:
|
if (millis() - last_millis > 1) { |
This interval is nonsense because the example must acquire new values and print a significant number of characters in that time:
|
Serial.println(buf1.timestamp()); // Print buffer timestamp |
|
Serial.println(buf1[0]); // Print sample from first channel |
|
Serial.println(buf1[1]); // Print sample from second channel |
|
|
|
Serial.println(buf2.timestamp()); // Print buffer timestamp |
|
Serial.println(buf2[0]); // Print sample from first channel |
|
Serial.println(buf2[1]); // Print sample from second channel |
This will take longer than a millisecond. And so the effective update rate will be slower than implied by the code.
The "ADC_Dual_Mode" example is configured to process the buffer every millisecond:
Arduino_AdvancedAnalog/examples/Advanced/ADC_Dual_Mode/ADC_Dual_Mode.ino
Line 26 in 38836d5
This interval is nonsense because the example must acquire new values and print a significant number of characters in that time:
Arduino_AdvancedAnalog/examples/Advanced/ADC_Dual_Mode/ADC_Dual_Mode.ino
Lines 27 to 33 in 38836d5
This will take longer than a millisecond. And so the effective update rate will be slower than implied by the code.