If you're seeing the splash screen then it means that it's not seeing the auto baud call. So your serial is not working. You've triple checked that you don't have Rx and Tx swapped right? It can also happen if you send the auto baud call too soon after the screen has started while it's not yet listening to serial commands. If you don't get an ACK from the auto baud call then the screen didn't hear you and you need to send it again.
Do you have an SD card in the display? On their other graphics processor at least certain SD cards can really slow down the startup of the screen, so you may need to change your startup delay.
What is it returning at the end of that sample code, ACK, NAK, or nothing? Without any additional information I can't offer any advice other than what I've already given.
You're not getting any response from the screen, so either your serial connection is not wired right or you're somehow sending the command too early while the screen is not listening.
Personally, I would change avenue33s wiring just slightly and instead of putting the reset pin of the display to a button, wire it to a digital pin on the arduino, then run this slightly modified test.
#include "NewSoftSerial.h"
#define RESET_PIN 9 //output wired to the reset pin of the LCD screen
#define STARTUP_DELAY 3000 //min 500, max 5000
#define SOFT_RX 2 // serial receive pin, must be wired to screens TX
#define SOFT_TX 3 // serial transmit pin, must be wired to screens RX
NewSoftSerial mySerial(SOFT_RX, SOFT_TX);
void setup() {
pinMode(RESET_PIN, OUTPUT); // setup the reset pin
digitalWrite(RESET_PIN, LOW); // hold the screen in reset while we finish setting up
Serial.begin(19200);
mySerial.begin(9600);
Serial.print("\n\n\n***\n");
digitalWrite(RESET_PIN, HIGH); // start the screen up
delay(STARTUP_DELAY); // wait for the screen to fully initialize
Serial.println("init \t");
mySerial.flush(); // clear out the serial read buffer
mySerial.print('U'); // connect
unsigned long startTime; // wait only for .5 seconds for a response, then timeout
bool timedOut=false;
startTime = millis();
while (!mySerial.available()) {
if ( millis() - startTime >= 500){
timedOut= true;
break;
}
}
if(timedOut) {
Serial.println("Connection timed out!");
Serial.println("increase STARTUP_DELAY and try again.");
Serial.println("if increasing delay does not help try reversing the TX and RX pins.");
}else {
int returnValue;
returnValue = mySerial.read();
if(returnValue == 0x06) {
Serial.println("Connection sucessful!");
} else if (returnValue == 0x15) {
Serial.println("Connection failed!");
Serial.println("try using a lower serial speed or increasing STARTUP_DELAY");
} else {
Serial.print("Unexpected response '");
Serial.print(returnValue , HEX);
Serial.println("'");
}
}
}
void loop() {
}
Are you sure you have the SGC and not the GFX version of the screen?
Just about the only other thing that I would think to check would to be a loop back test on the serial port just to be confident that it is working as I assume it is. Connect a wire directly between the TX and RX pins on the arduino, write something to the serial port and then read it back, making sure it's the same at both ends.
You could also try a loop through with your hardware serial port. Set both hard and software serial ports to the same baud rate. Connect TX from the software port to RX of the hardware port. Then write something to the software port and read it back on the hardware port, making sure it's the same. Optionally you can then also write what you read back to the hardware port again and see it echoed on the serial monitor on your computer.
If you have a picture of your wiring perhaps someone might be able to catch something non-obvious that could be causing your trouble, but beyond that it sounds like you've done everything right and you'll probably have to take it up with 4D tech support.
#include "NewSoftSerial.h"
#define RESET_PIN 5 //output wired to the reset pin of the LCD screen
#define STARTUP_DELAY 3000 //min 500, max 5000
#define SOFT_RX 2 // serial receive pin, must be wired to screens TX
#define SOFT_TX 3 // serial transmit pin, must be wired to screens RX
void setup() {
pinMode(RESET_PIN, OUTPUT); // setup the reset pin
digitalWrite(RESET_PIN, LOW); // hold the screen in reset while we finish setting up
Serial.begin(19200);
Serial1.begin(9600);
Serial.print("\n\n\n***\n");
digitalWrite(RESET_PIN, HIGH); // start the screen up
delay(STARTUP_DELAY); // wait for the screen to fully initialize
Serial.println("init \t");
Serial1.flush(); // clear out the serial read buffer
Serial1.print('U'); // connect
unsigned long startTime; // wait only for .5 seconds for a response, then timeout
bool timedOut=false;
startTime = millis();
while (!Serial1.available()) {
if ( millis() - startTime >= 500){
timedOut= true;
break;
}
}
if(timedOut) {
Serial.println("Connection timed out!");
Serial.println("increase STARTUP_DELAY and try again.");
Serial.println("if increasing delay does not help try reversing the TX and RX pins.");
}else {
int returnValue;
returnValue = Serial1.read();
if(returnValue == 0x06) {
Serial.println("Connection sucessful!");
} else if (returnValue == 0x15) {
Serial.println("Connection failed!");
Serial.println("try using a lower serial speed or increasing STARTUP_DELAY");
} else {
Serial.print("Unexpected response '");
Serial.print(returnValue , HEX);
Serial.println("'");
}
}
}
void loop() {
}