 #include "Cosa/TWI/Driver/BMP085.hh"
 #include "Cosa/TWI/Driver/HMC5883L.hh"
 #include "Cosa/TWI/Driver/L3G4200D.hh"
+#include "Cosa/TWI/Driver/DS1307.hh"
 
 // LCD and communication port
 // HD44780::Port4b port;

 * This file is part of the Arduino Che Cosa project.
 */

#include "Cosa/Watchdog.hh"
#include "Cosa/Trace.hh"
#include "Cosa/AnalogPin.hh"


void loop()
{
  // Read the time from the rtc device and print
  time_t now;
  rtc.get_time(now);
  now.to_binary();
  trace << clear;
  trace << PSTR("RTC; ") << now;

  // Read battery 
#if (HEIGHT == 2)
  sleep(2);
  trace << clear;
#else
  trace << endl;
#endif
  trace << PSTR("VCC: ") << AnalogPin::bandgap() << PSTR(" mV") << endl;

  // Free memory
  trace << PSTR("MEM: ") << free_memory() << PSTR(" bytes");
  sleep(2);

  // Read barometer; pressure and temperature
  bmp.sample();
  trace << clear;
  trace << PSTR("Barometer:") << endl;
  trace << bmp.get_pressure() << PSTR(" Pa, ");
  trace << (bmp.get_temperature() + 5) / 10 << PSTR(" C");
#if (HEIGHT == 2)
  sleep(2);
  trace << clear;
#else
  trace << endl;
#endif

  // Read compass heading
  compass.read_heading();
  compass.to_milli_gauss();
  HMC5883L::data_t dir;
  compass.get_heading(dir);
  trace << PSTR("Compass:") << endl;
  trace << dir.x << PSTR(", ") 
	<< dir.y << PSTR(", ") 
	<< dir.z;
