       aJsonObject* freq = aJson.getObjectItem(root, "freq");
       aJsonObject* data = aJson.getObjectItem(root, "data");
       if (freq != NULL && data != NULL) {
-        const int d_size = aJson.getArraySize(data);
-        unsigned int rawData[d_size];
+        const uint16_t d_size = aJson.getArraySize(data);
+        uint16_t rawData[d_size];
         for (int i = 0; i < d_size; i++) {
           aJsonObject* d_int = aJson.getArrayItem(data, i);
           rawData[i] = d_int->valueint;
         }
-        irsend.sendRaw(rawData, d_size, freq->valueint);
+        irsend.sendRaw(rawData, d_size, (uint16_t)freq->valueint);
         irrecv.enableIRIn();
         req = "";
         aJson.deleteItem(root);

#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <IRremoteESP8266.h>
#include <aJSON.h>

const int send_pin = 12;

String dumpIRcode (decode_results *results) {
  String s = "";
  for (int i = 1;  i < results->rawlen;  i++) {
    s += results->rawbuf[i] * RAWTICK;
    if ( i < results->rawlen - 1 ) s += ",";
  }
  return s;
