-#include <Wire.h>
-#include <FastGPIO.h>
-#include <USBPause.h>  // TODO: change to UsbPause.h after that library is released
+/** Test program for the PololuHD44780 library which test all of
+ * the functions it defines.  This program is mainly meant as a
+ * test suite for library developers who want to make sure that
+ * their changes did not break any previously-working features of
+ * the library. */
+
 #include <PololuHD44780.h>
-#include <util/delay.h>
-
-// TODO: change this to use PololuHD44780, remove this class and make sure PololuHD44780 works
-
-class MyLCD : public PololuHD44780Base
-{
-    static const uint8_t rs = 7;
-    static const uint8_t e = 8;
-    static const uint8_t db4 = 14;
-    static const uint8_t db5 = 17;
-    static const uint8_t db6 = 13;
-    static const uint8_t db7 = IO_D5;
-
-public:
-
-    virtual void initPins()
-    {
-        FastGPIO::Pin<e>::setOutputLow();
-    }
-
-    virtual void send(uint8_t data, bool rsValue, bool only4bits)
-    {
-        FastGPIO::Pin<rs>::setOutput(rsValue);
-
-        USBPause usbPause;
-        FastGPIO::PinLoan<db4> loanDB4;
-        FastGPIO::PinLoan<db5> loanDB5;
-        FastGPIO::PinLoan<db6> loanDB6;
-        FastGPIO::PinLoan<db7> loanDB7;
-
-        if (!only4bits)
-        {
-            sendNibble(data >> 4);
-        }
-        sendNibble(data & 0x0F);
-    }
-
-private:
-    void sendNibble(uint8_t data)
-    {
-        FastGPIO::Pin<db4>::setOutput(data >> 0 & 1);
-        FastGPIO::Pin<db5>::setOutput(data >> 1 & 1);
-        FastGPIO::Pin<db6>::setOutput(data >> 2 & 1);
-        FastGPIO::Pin<db7>::setOutput(data >> 3 & 1);
-
-        // Send a pulse on the Enable line.  According to the "Bus
-        // Timing Characteristics" section of the HD44780 datasheet,
-        // 450 ns is the minimum enable pulse width (PW_EH) and the
-        // minimum enable cycle time is 1000 ns.
-        FastGPIO::Pin<e>::setOutputHigh();
-        _delay_us(1);   // At least 450 ns.
-        FastGPIO::Pin<e>::setOutputLow();
-        _delay_us(1);   // At least 550 ns.
-    }
-};
-
-MyLCD lcd;
+
+PololuHD44780 lcd(7, 6, 5, 4, 3, 2);
 
 void loadCustomCharacters()
 {

    };
    lcd.loadCustomCharacter(smiley, 0);

    // Make sure that old code that uses 'char' for the pictures still works
    // because the OrangutanLCD function took char* instead of uint8_t*.
    static const char back_arrow[] PROGMEM = {
	0b00000,
	0b00010,

void loop()
{
  lcd.reinitialize();
  loadCustomCharacters();

  // Test both overloads of write
  // Expected screen: "Hello   "
