where is the problem? trying to print code in Serial Monitor.

1- I’m trying to print twitter status updates (xml) in the Arduino serial monitor.2- Then I want to send to an LCD3- If you copy and paste from this post you will miss stuff so I’ve included it in .RTFRight now I’m pretty sure the information is being pulled from the internet but is not printing in the Serial Monitor. Any help figuring it out would be great.etwitterlcdmegan_isolatetfeed

    eTwitterLCDMegan_IsolateTfeed

#include #include #include //Setup Ethernet Linkbyte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };byte ip[] = { 192, 168, 2, 10 };byte gateway[] = { 192, 168, 2, 1 }; //your router's IP address 192.168.2.1byte subnet[] = { 255, 255, 255, 0 }; //subnet mask of the networkbyte server[] = { 128, 121, 146, 100 }; //twitter.comClient client(server, 80);//Setup LCD Display//This is for a different LCD not the one megan has.//#define txPin 3//#define rxPin 2#define charDelay 50//SoftwareSerial lcdSerial = SoftwareSerial(rxPin, txPin);//Globals#define cyclePageDelay 24000 //milliseconds between page cycles - changed this so as not to max out twitter.#define cycleCount 15 //number of page cycles before contacting server for more dataint readingData = 1;int readingTag = 0;int readingText = 0;int readingSN = 0;int last_reading_SN = 0;int readTagNum = 0;int rxDatalength = 0;int txDatalength = 0;int cyclecountnum = 0;int textLength = 0;//String arrayschar text[250];char rxData[250];char readTag[50];char last_char;//char textTag[] = "text"; //What is this for?//char snTag[] = "screen_name"; //What is this for?void setup(){//Init SerialSerial.begin(9600);//Init EthernetEthernet.begin(mac, ip, gateway, subnet);// BH - could this be swapped out with the other one?//Init LCD//pinMode(rxPin, INPUT);//pinMode(txPin, OUTPUT);//lcdSerial.begin(9600);// clearLCD();// lcdSerial.print("eTwitter Reader v0.3");// delay(2000);}void loop(){Update();}void Update(){if (client.connect()) {Serial.println("connected to server.");client.println("GET /statuses/friends_timeline/cawsand.xml HTTP/1.0"); //http://twitter.com/#search?q=leeds or statuses/friends_timeline/cawsand.xml or "GET /statuses/friends_timeline/cawsand.xml HTTP/1.0"client.println("Authorization: Basic ####################");client.println();while (client.connected() && readingData)readInData();client.stop();appendText();// updateLCD();updateSerial();resetVars();}else {Serial.println("connection failure.");//clearLCD();//lcdSerial.print("Connection failure. Check network.");delay(30000);}}void readInData(){if (client.available()) {char c = client.read();if (last_char == 60 && c != 47) { // "" detected...tag endedreadingTag = 0;else if (last_char == 60 && c == 47) // end of the tag - don't allow anymore to be parsed until next tagclearStr(readTag);if (readingTag) { //we're reading a tag, shove it into this buffer so we can check it out after we've read the whole tagreadTag[readTagNum++] = c;}else { //see if the tag we're looking at matches what we need//if (strcmp(readTag, textTag) == 0 && c != 60 && c != 62)readingText = 1;// else if (strcmp(readTag, snTag) == 0 && c != 60 && c != 62)readingSN = 1;//else //we're either looking at the wrong tag or there's a greaterthan/lessthanreadingText = readingSN = 0;}if (readingSN == 0 && last_reading_SN == 1) //state change...once we've read through a tweet we no longer need datareadingData = 0;if (readingText)text[textLength++] = c;else if (readingSN)rxData[rxDatalength++] = c;last_reading_SN = readingSN;last_char = c;}}//void clearLCD(){//lcdSerial.print(0xFE, BYTE); //command flag//lcdSerial.print(0x01, BYTE); //clear command.// delay(charDelay);//}//This void updateSerial is something BH added to print to the serial rather than the LCDvoid updateSerial(){if (rxDatalength > 80) { //long message - need to cycle the display between 2 pageswhile (cyclecountnum < cycleCount){while (txDatalength < 80) {Serial.println(rxData[txDatalength++]);delay(charDelay);}delay(cyclePageDelay);cyclecountnum++;while (txDatalength < rxDatalength) {Serial.println(rxData[txDatalength++]);delay(charDelay);}delay(cyclePageDelay);cyclecountnum++;txDatalength = 0;}cyclecountnum = 0;}else {while (txDatalength < rxDatalength) {Serial.println(rxData[txDatalength++]);delay(charDelay);}while (cyclecountnum < cycleCount) {delay(cyclePageDelay);cyclecountnum++;}cyclecountnum = 0;}}//void updateLCD(){//if (rxDatalength > 80) { //long message - need to cycle the display between 2 pages//while (cyclecountnum < cycleCount)//{//clearLCD();//while (txDatalength < 80) {//lcdSerial.print(rxData[txDatalength++]);//delay(charDelay);// }//delay(cyclePageDelay);//cyclecountnum++;//clearLCD();//while (txDatalength < rxDatalength) {//lcdSerial.print(rxData[txDatalength++]);//delay(charDelay);// }//delay(cyclePageDelay);//cyclecountnum++;//txDatalength = 0;//}//cyclecountnum = 0;//}//else {//clearLCD();//while (txDatalength < rxDatalength) {//lcdSerial.print(rxData[txDatalength++]);//delay(charDelay);//}//while (cyclecountnum < cycleCount) {//delay(cyclePageDelay);//cyclecountnum++;// }//cyclecountnum = 0;//}//}void clearStr (char* str) {int len = strlen(str);for (int c = 0; c < len; c++) {str[c] = 0;}}void appendText() {rxData[rxDatalength++] = 58; //colonrxData[rxDatalength++] = 32; //space//Add the text of the tweet in front of the screen namefor (int c = 0; c < textLength; c++) {rxData[rxDatalength++] = text[c];}}void resetVars() {readingData = 1;readingTag = 0;readingText = 0;readingSN = 0;last_reading_SN = 0;readTagNum = 0;rxDatalength = 0;txDatalength = 0;cyclecountnum = 0;textLength = 0;clearStr(rxData);clearStr(readTag);clearStr(text);last_char = 0;}***code fromThe Tech JunkiesProject: Ethernet Enabled Twitter Clienthttp://ttjcrew.com/?p=32