   // digital humididy temperature
   dht_setup();
   
+  // PIR
+  pir_setup();
+  
   // WWW
   web_setup();
 
-  // PIR
-  pir_setup();
-  
   // OLED
   oled_setup();
 

// send an NTP request to the time server at the given address
unsigned long ntp_send_packet()
{
  Serial.println("sending NTP packet...");
  // set all bytes in the buffer to 0
  memset(ntp_packet_buffer, 0, NTP_PACKET_SIZE);
  // Initialize values needed to form NTP request
  // (see URL above for details on the packets)
  ntp_packet_buffer[0] = 0b11100011;   // LI, Version, Mode
  ntp_packet_buffer[1] = 0;     // Stratum, or type of clock
  ntp_packet_buffer[2] = 6;     // Polling Interval
  ntp_packet_buffer[3] = 0xEC;  // Peer Clock Precision
  // 8 bytes of zero for Root Delay & Root Dispersion
  ntp_packet_buffer[12]  = 49;
  ntp_packet_buffer[13]  = 0x4E;

DHT dht(DHTPIN, DHTTYPE);

// Temperature, humidity and heat index variables
float h=0,t=0,f=0,hic=0,hif=0;

void dht_clear(){ h=t=f=hic=hif=0; }

