                           0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, BCC, ETX };
   unsigned char response[bufferSize];
 
+  // send command
+  RDM880.write(CMD, sizeof(CMD)/sizeof(CMD[0]));
+
+  // get response packet and print
   while(RDM880.available()) {
     response[i] = RDM880.read();
     Serial.print(response[i], HEX);

#define CMD_INCREMENT 0x24
#define CMD_GET_SNR 0x25

/* RFID Reader
   Uses RDM880 breakout board with RX connected to pin 2 and TX connected to pin 3. 
   Another serial interface is added by including the Software Serial library.
   Dummy signal from 3.3 V is connected to pin 4.

   Input:
      RFID tags
      Signal from Pin 4

   Output:
      Serial number of tag scanned
      Elapsed time

   Operation:
      Reader waits until a tag is scanned, then prints the serial number of the tag.
      Reader now waits for "control" signal, and when that signal goes high, counts time.

*/


  
}

// Write a block at a sector with 16 bytes (can do up to 4 blocks)
void MF_WRITE(unsigned char numBlocks, unsigned char startSector, unsigned char time) {
  BCC = checksum({ 0x00, 0x1A, CMD_WRITE, 0x01, 0x01, startSector,
                    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
                    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
                    time }, 28);
  unsigned char CMD[] = { STX, 0x00, 0x1A, CMD_WRITE, 0x01, 0x01, startSector,
                          0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
                          0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
                          time, BCC, ETX };
  unsigned char response[bufferSize];

  // send command
  RDM880.write(CMD, sizeof(CMD)/sizeof(CMD[0]));

}