 struct sample_t {
   uint16_t luminance;
   uint16_t temperature;
+  
+  sample_t(uint16_t lum, uint16_t temp)
+  {
+    luminance = lum;
+    temperature = temp;
+  }
 };
 
 const uint8_t STAT_CMD = 2;

  uint16_t resent;
  uint16_t received;
  uint16_t failed;
};

// Counters
uint16_t sent = 0;
uint16_t resent = 0;
uint16_t received = 0;
uint16_t failed = 0;
  
void update(int8_t nr)
{
  sent += 1;
  if (nr <= 0) 
    failed += 1; 
  else if (nr > 1)
    resent += (nr - 1);
}

void setup()
{
  // Start watchdog for delay

#include "Cosa/VWI/Codec/ManchesterCodec.hh"
#include "Cosa/VWI/Codec/BitstuffingCodec.hh"
#include "Cosa/VWI/Codec/Block4B5BCodec.hh"
#include "Cosa/RTC.hh"
#include "Cosa/Watchdog.hh"

