Skip to content

Commit

Permalink
Change enviromental (pressure) data output interval to same length as…
Browse files Browse the repository at this point in the history
… integration interval e.g. 10 seconds.
  • Loading branch information
kaklik committed Jun 15, 2024
1 parent b5f3d44 commit 9dcf14b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fw/AIRDOS04/AIRDOS04.ino
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ void setup()

digitalWrite(SDpower, HIGH); // SD card power on
digitalWrite(SS, HIGH); // Disable SD card
digitalWrite(SCK, LOW);
delay(100);
digitalWrite(SCK, LOW);
delay(100);

digitalWrite(SDmode, LOW); // SD card reader oscilator off

Expand Down Expand Up @@ -549,7 +549,7 @@ while(true)
boolean USBchanged = true; // USB devaci need to be changed

wdt_enable(WDTO_2S); // watchdog for preventing I2C hanging

Wire.beginTransmission(0x6A); // ADC of VBUS
Wire.write(0x2D); // MSB 0.264 V/bit
Wire.endTransmission();
Expand Down Expand Up @@ -588,9 +588,9 @@ while(true)
wdt_reset();
delay(1000); // Vaiting for capacitor discharge
wdt_reset();
delay(1000);
delay(1000);
wdt_reset();
delay(1000);
delay(1000);
wdt_reset();

for( uint16_t n=0; n<200; n++)
Expand Down Expand Up @@ -983,7 +983,7 @@ void loop()
Wire.write((uint8_t)0x18); // Start register
Wire.write((uint8_t)0x0A); //
Wire.endTransmission();

while(true)
{
delay(5000);
Expand All @@ -1010,7 +1010,7 @@ void loop()
histogram[n]=0;
};

if (env >= 5*6) // Environment out every 5 minutes
if (env >= 1) // Environment out every integration interval
{
env = 0;
EnvOut();
Expand Down

0 comments on commit 9dcf14b

Please sign in to comment.