Dear All,
I am a beginner and I am experiencing a strange problem.
I ma using Serial.print("Debug") to debug and follow the step of the code.
For now I am testing that function.
static void sendData(const char* data) {
// digitalWrite(LED_STATUS, HIGH);
Serial.print("");
Serial.println(" *** Starting Sending ***");
Serial.println(" > Setting up PDP Context");
//sendATCommand("AT+CGDCONT=1,\"IP\",\"wap.cingular\"");
Serial.println(" > Configure APN");
//sendATCommand("AT+CGPCO=0,\"\",\"\", 1");
Serial.println(" > Activate PDP Context");
//sendATCommand("AT+CGACT=1,1");
// Change 0.0.0.0 to reflect the server you want to connect to
Serial.println(" > Configuring TCP connection to server");
//sendATCommand("AT+SDATACONF=1,\"TCP\",\"92.104.69.134\",81");
Serial.println(" > Starting TCP Connection");
//sendATCommand("AT+SDATASTART=1,1");
Serial.println(" > Delay of 1 sec");
delay(1000);
//Serial.println("Getting status");
//sendATCommand("AT+SDATASTATUS=1");
Serial.println(" > Sending data");
//sendATCommand(data);
//Serial.println("Getting status");
//sendATCommand("AT+SDATASTATUS=1");
// IThe problem startes here
//Serial.println(" > Colse connectrion");
//sendATCommand("AT+SDATASTART=1,0");
// Serial.println(" > Disable PDP Context");
//sendATCommand("AT+CGACT=0,1");
// Clear string and flash LED
//myStr.begin();
//successLED();
//digitalWrite(LED_STATUS, LOW);
All uncommented Serial.print() return the text and the code continue. Excpeted when I uncomment
Serial.println(" > Colse connectrion");
Just after the comment
// IThe problem startes here.
Is there an error message? No. When I compile and send the code to the Ardiuno, it only display the letter
P
from "Power on" of the settup loop
void setup() {
pinMode(LED_STATUS, OUTPUT); //int LED_STATUS = 13;
pinMode(LED_ERROR, OUTPUT); // int LED_ERROR = 12;
pinMode(GPS_RELAY, OUTPUT); // int GPS_RELAY = 9;
////Initialize serial ports for communication.
Serial.begin(4800);
cell.begin(9600);
//Let's get started!
Serial.println("Power on");
// Check LEDS
blinkLed(LED_ERROR, 5, 25);
blinkLed(LED_STATUS, 5, 25); // Pin, flashtime, delay
}
Then I am a bit suprise.
(There is other Serial.print() in the code....)
Any idea?
Thank