 #include <DHT.h>
-
-
 #include <WiFi.h>
 #include <WiFiClient.h>
-//#include <WiFiServer.h>
-//#include <WiFiUdp.h>
 #include <PubSubClient.h>
 #include <SPI.h>
 

char pwd[] = "mqtt";
int port = 1883;
int tiltState;
int previousTiltState = 2;

//Time on arduino http://playground.arduino.cc/Code/DateTime

char topicTempHum[] = "arduino-weather-exchange"; //change to a proper name!!!!!!!!!!!!!!!!!!!

// defines and variable for sensor/control mode
#define MODE_OFF    0  // not sensing light, LED off
#define MODE_ON     1  // not sensing light, LED on
#define MODE_SENSE  2  // sensing light, LED controlled by software
int senseMode = 0;
char message_buff[100];
//setup MQTT
WiFiClient wifiClient;
//MQTT
PubSubClient client(serverRabbit, port, callback, wifiClient);
  
void setup() {
  // initialize serial and wait for the port to open:
  Serial.begin(9600);
  while (!Serial);
  
  connectToWifi();
  
  // set the LED pins as outputs
  // the for() loop saves some extra coding
  for (int pinNumber = 2; pinNumber < 5; pinNumber++) {


//#define MQTT_SERVER "192.168.0.8"
byte mac[]    = {  0x90, 0xA2, 0xDA, 0x0E, 0x07, 0x18 };
byte serverRabbit[] = { 192, 168, 0, 2 };//192.168.0.8
byte ip[]     = { 192, 168, 0, 4 };
//char* user = "guest";
//char* pwd = "guest";
