Skip to content

Commit 4f64a07

Browse files
committed
Add a delay between average measurements in readAverageData()
1 parent 538e529 commit 4f64a07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hackair.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ void hackAIR::readAverageData(hackAirData &data, uint8_t n) {
140140
uint8_t successes = 0;
141141

142142
for (uint8_t i = 0; i < n; i++) {
143+
delay(1000); // Wait for a new reading, all sensors have a maximum
144+
// 1Hz sampling rate
143145
readData(data);
144146

145147
if (data.error == 0) {

0 commit comments

Comments
 (0)