  * (D2)-----[ ]-------56-|IRQ         |
  *                       +------------+
  *
- *                       DS18B20/sensor
- *                       +------------+
- * (GND)---------------1-|GND         |
- * (D14)-----+---------2-|DQ          |
- *           |       +-3-|VDD         |
- *          4K7      |   +------------+
+ *                           DS18B20/3
+ *                       +------------+++
+ * (GND)---------------1-|GND         |||\
+ * (D7)------+---------2-|DQ          ||| |
+ *           |       +-3-|VDD         |||/
+ *          4K7      |   +------------+++
  *           |       | 
- * (VCC)-----+-------+
+ * (VCC)-----+       +---(VCC/GND)
  *
  * This file is part of the Arduino Che Cosa project.
  */

{
  Watchdog::begin();

  // Connect the sensor and set resolution to 10-bits
  sensor.connect(0);
  sensor.set_resolution(10);
  sensor.write_scratchpad();

  // Start ethernet controller and request network address for hostname
  ethernet.begin_P(CLIENT);

#include "Cosa/OWI/Driver/DS18B20.hh"
#include "Cosa/Socket/Driver/W5100.hh"

// Disable SD on Ethernet Shield
#define USE_ETHERNET_SHIELD
#if defined(USE_ETHERNET_SHIELD)
#include "Cosa/OutputPin.hh"
OutputPin sd(Board::D4, 1);
#endif

// One-wire pin and connected DS18B20 device
OWI owi(Board::D7);

// The devices connected to the one-wire bus
DS18B20 outdoors(&owi);
DS18B20 indoors(&owi);
DS18B20 basement(&owi);

DS18B20* thermometer[] = {
  &outdoors,
  &indoors,
  &basement
};

// Network configuration
#define MOSQUITTO "test.mosquitto.org"
