 /*
  * Send arbitrary IR codes via a web server or MQTT.
  * Copyright David Conran 2016, 2017, 2018
- * Version 0.3 Oct, 2017
  *
- * NOTE: An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). See IR_LED
+ * NOTE: An IR LED circuit *MUST* be connected to ESP8266 GPIO4 (D2). See IR_LED
  *
  * WARN: This is very advanced & complicated example code. Not for beginners.
  *       You are strongly suggested to try & look at other example code first.

#include <string>

// Configuration parameters
#define IR_LED 4  // GPIO the IR LED is connected to/controlled by. GPIO 4 = D2.
#define HTTP_PORT 80  // The port the HTTP server is listening on.
#define HOSTNAME "ir_server"  // Name of the device you want in mDNS.


  irsend.begin();

  #ifdef DEBUG
  // Use SERIAL_TX_ONLY so that the RX pin can be freed up for GPIO/IR use.
  Serial.begin(BAUD_RATE, SERIAL_8N1, SERIAL_TX_ONLY);
  while (!Serial)  // Wait for the serial connection to be establised.
    delay(50);
  Serial.println();
  debug("IRMQTTServer " _MY_VERSION_" has booted.");
  #endif  // DEBUG

  setup_wifi();
