 
 void loop()
 {
-  std::cout << F( "Current time: " ) << qsense::net::DateTime::singleton().currentTime() << std::endl;
+  Serial.print( F( "Current time: " ) );
+  Serial.println( client.currentTime() );
   measure();
+  
+  Serial.print( F( "Free SRAM: " ) );
+  Serial.println( freeRam() );
+  delay( 5000 );
+}
 
-  std::cout << F( "Free SRAM: " ) << freeRam() << std::endl;
-  delay( 60000 );
-}

#include <SPI.h>
#include <Ethernet.h>
#include <WiFi.h>

#include <StandardCplusplus.h>

#include <QHttpClient.h>
#include <DateTime.h>
#include <SidecarClient.h>
#include <UUID.h>

namespace std
{
  ohserialstream cout(Serial);
}

using qsense::QString;

const int ledPower = 12;


// A proper unique mac address is critical to having a stable UUID generated
// for events published to Sidecar service.  Please use the MAC address

{
  if ( Ethernet.begin( mac ) == 0 )
  {
    Serial.println( F( "Failed to configure Ethernet using DHCP" ) );
    Ethernet.begin( mac, ip );
  }

  // give the Ethernet shield a second to initialize:
  Serial.println( F( "Connecting to network..." ) );
  delay( 1000 );

  // Initialise network API to use Ethernet
  SimpleSidecarClient::initNetworkType( SimpleSidecarClient::Ethernet );
}


