16x2 LCD with Seeeduino Mega - ongoing difficulties

I am attempting to display text using my basic 16x2 character LCD screen controlled by a Seeeduino Mega. I have gone through the official tutorials, and hunted around the web for similar problems. Others have had similar issues, but seemingly not in the last couple of years. With the backlight on, my screen alternates between completely blank and top row black/bottom row completely white. If the backlight is off, it alternates between both lines lit up and both lines off. I have tried changing the lcd.begin(16,2) to lcd(8,2) with no success.

LCD screen (white characters/black background): Basic 16x2 Character LCD - White on Black 5V - LCD-00709 - SparkFun Electronics
Datasheet: https://www.sparkfun.com/datasheets/LCD/GDM1602K-Extended.pdf

I am working off of the HelloWorld example from the Arduino LiquidCrystal library. Here is my wiring setup, and below that is my code, with slight modifications so I could monitor where the program is and if it gets snagged up.

LCD pin → Arduino pin:
1 → GND
2 → +5V
3 → washer of 10k pot
4 → 8
5 → 7
6 → 6
7 thru 10 → not connected
11 → 5
12 → 4
13 → 3
14 → 2
15 → +5V
16 → GND

// include the library code:
#include <LiquidCrystal.h>

int counter = 0;

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 7, 6, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  delay(3000);
  Serial.begin(9600);
  Serial.println("abc");
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.setCursor(0,0);
  lcd.print("hello, world!");
  Serial.println("def");
  delay(2000);
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
  delay(500);
  Serial.println(counter);
  counter++;
}

Please make me seem like an idiot by finding something simple I’ve done wrong. Thanks for your time!

At a quick glance everything 'looks' ok but since it isn't working lets start with the easiest troubleshooting first.

With the backlight on, my screen alternates between completely blank and top row black/bottom row completely white.

I would remove all of the serial monitor code and I would remove all of the code in loop (everything between the brackets). The delays shouldn't be needed either but they wont hurt anything if you leave them in.

I have tried changing the lcd.begin(16,2) to lcd(8,2) with no success.

That will make no difference (as long as you really didn't leave out the 'begin').

If you still don't see your "hello, world" message then you really should disconnect all of the wires and start over with this three step sequence. (1) Get the backlight working - by the way it probably needs an external current limiting resistor. (2) Get the contrast working. Don't go to step three if you can't get a row of blocks to appear. (3) Connect the six (or seven since you are using RW) wires between the LCD and the Arduino and display a static message (nothing in loop - as described above).

If you are still having problems then we need some good photographs.

Don

10-4. Will report back tomorrow with results.

So today's moral of the story is to always double-check your datasheet. I looked at my board and saw a "+" and a "-" on what I assumed were pins 2 and 1, respectively.

False.

They were pins 16 and 15. I had my pins on the screen completely backwards. A little bit of rewiring and everything works like a charm. If anyone needs me, I will be in the corner with my dunce cap on.