evanschrs

I currently have a working model which displays data from a webpage on a LED matrix, this uses an Arduino Mega connected to an LED Matrix and a computer, via Serial Processing on the computer gets the data online then sends to the arduino which displays it on the LED matrix.

This works great.

However my next mission is to get it to be self contained, I am able to get the data from the webpage using just the arduino (with wifi shield) and display it on the Matrix, however when I try to get the data online again it breaks the matrix.

I am looking for any other ways to get a very small amount of data from a webpage than the one I am using which is defiantly not working. See below for my code:

byte server[] = { 173,254,28,46 }; //ip Address of the server you will connect to

//The location to go to on the server//make sure to keep HTTP/1.0 at the end, this is telling it what type of file it isString weblocal = "/~evansch1/arduinoadmin/fbconn.php?uid=wonderroomarduino HTTP/1.0"; // Arduinos Unique ID Goes here!

String readPage(){ return inString; } } } }} // End readPage //This is REALLY ridiculous - taking a global char array containing the data and wrapping it in a String object just so that the function can have something to return.

Sorry can you elaborate on this, I am quite new to coding Arduino so am not totally sure what you mean:

"This is REALLY ridiculous - taking a global char array containing the data and wrapping it in a String object just so that the function can have something to return."

You have a function, readPage() that collects data into a global array, inString. Does that function need to return anything, when the data is already in a global place? No, it does not. But, you have it wrap the data in an instance of a class that is known to have problems.

That function is only called by connectAndRead(), which doesn't do anything with the data that was read. It simply returns the object that was created to wrap the global data.

The connectAndRead() function is called in two places. Each of them simply prints the data that is returned somewhere (to the serial port or to the matrix). In both of those cases, the data has to be extracted from the wrapper, so the overhead of passing global data wrapped in a leaky mess is completely unnecessary.