ModifyArduinoLCD

If you are using the Firewing DOGM 3 x 16 LCD display, you will need to modify the Arduino LCD library to support a 3 x 16 display. First of all, you need to find the correct Arduino library. It's called "LiquedCrystal.cpp" and it can be found in you Arduino library folder. For example,

 <arduino-install-path>\libraries\LiquidCrystal

You now need to find a routine called "LiquidCrystal::setCursor". You don't need to delete this code, but you will need to comment it out, like this:

/*
void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
{
  int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
  if ( row >= _numlines ) {
    row = _numlines-1;    // we count rows starting w/0
  }
  command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
}
*/

and replace with this routine:

void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
{
  int dogm_row_offsets[] = { 0x00, 0x10, 0x20, 0x54 };
  int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };

  if ( row >= _numlines ) {
    row = _numlines-1;    // we count rows starting w/0
  }

  if (_numlines == 3) {
     command(LCD_SETDDRAMADDR | (col + dogm_row_offsets[row]));
  }
  else {
     command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
  }
}

and that's it! You will now be able to using the Firewing DOGM 3 x 16 LCD display.