From 8bc17c45c7aff05e54a77c03ba6b1c7339deefc1 Mon Sep 17 00:00:00 2001 From: klaute Date: Wed, 21 Sep 2016 18:27:41 +0200 Subject: [PATCH] Fixed the initial ADC read value problem - the values are to shaking around. --- firmware/command_ctrl.ino | 7 +++++++ tools/meas.py | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/command_ctrl.ino b/firmware/command_ctrl.ino index 3397ce8..f51478f 100644 --- a/firmware/command_ctrl.ino +++ b/firmware/command_ctrl.ino @@ -200,6 +200,13 @@ void cc_startMeasurement() { si5351.drive_strength(SI5351_CLK0, drive_str); // 2 4 6 8ma + uint8_t t = 0; + for (t = 0; t < 200; t++) + { + uint16_t tmp = analogRead(A0); + tmp = analogRead(A1); + } + uint32_t freq = 0; for (freq = start_freq; freq < end_freq; freq += step_freq) { diff --git a/tools/meas.py b/tools/meas.py index 8a94daa..ed0bbf9 100644 --- a/tools/meas.py +++ b/tools/meas.py @@ -520,7 +520,6 @@ if __name__ == "__main__": plt.plot(meas_freq, meas_ratio) plt.plot(meas_freq, meas_r) plt.plot(meas_freq, meas_p) - print meas_r print "Please close the mathplot window to exit..." plt.show()