     }
   } else {
     debug("Couldn't connect");
-    for(int i=0; i < 10; i++) {
+    for(byte i=0; i < 10; i++) {
       digitalWrite(errorLED, HIGH);
       delay(100);
       digitalWrite(errorLED, LOW);

// const char* host = "192.168.1.67"; // lazyatom
// const char* host = "178.79.132.137"; // interblah
const char* host = "wee-printer.gofreerange.com";
const uint16_t port = 80;
const char *path = "/printer/1";

boolean downloadWaiting = false;
char* cacheFilename = "TMP";

void checkForDownload() {
  uint32_t length = 0;
  uint32_t content_length = 0;

  if (SD.exists(cacheFilename)) SD.remove(cacheFilename);
  File cache = SD.open(cacheFilename, FILE_WRITE);

  digitalWrite(readyLED, LOW);
}

const byte printer_RX_Pin = 2;  // this is the green wire
const byte printer_TX_Pin = 3;  // this is the yellow wire
Thermal printer(printer_RX_Pin, printer_TX_Pin);
const byte postPrintFeed = 3;

void initPrinter() {
  printer.begin(150);
}

const byte SD_Pin = 4;
void initSD() {
  pinMode(SD_Pin, OUTPUT);
  SD.begin(SD_Pin);
