   IBM Wheelwriter hack
   Pin 0: connected through MOSFET to Wheelwriter bus
          Will pull down the bus when set to zero
+  Pin 2: ALSO connected to the bus, but listens instead of 
+         sending data
  */
+
+#include<QueueArray.h>
+#include<PinChangeInt.h>
 
 static int d0 = 0;
 static int d1 = 1;

  // is actually bit 3 in the DDRD and PORTD registers
  // start the pin high
  //PORTD |= 0b00000100;

  // start the pin low
  PORTD &= 0b11111011;

    // make sure we aren't still pulling down
    PORTD &= 0b11111011;

    delayMicroseconds(6 ); // wait for pin to go high before we re-enable interrupts
    // re-enable interrupts
    interrupts();

}

void send_letter(int letter) {
    while (!nextCharOkay) {
      // busy
    }
    q.enqueue(0b100100001);
    q.enqueue(0b000001011);
    q.enqueue(0b100100001);
    q.enqueue(0b000000011);
    q.enqueue(letter);
    q.enqueue(0b000001010);
    pinChangeCount = 1; // pretend we've seen a change on the bus
    nextCharOkay = false;
    pinChanged();

    //delay(LETTER_DELAY); // before next character
}

void send_return(int numChars) {
