lcd.print only showing last digit from serial

I have an LCD which is simply printing what is being displayed in the Serial Window.

The serial window is displaying the result of an API call in digits (a number from 0 - 3000). The current result is 75. Weirdly the LCD only displays the second digit (currently showing 5).

Any idea why this would be? I have tried using int rather than a char but that just displays the wromg number (always shows 53). The number is ALWAYS correct i the serial window though.

Here is the snippet:

     // Now we've got to the body, so we can print it out
        unsigned long timeoutStart = millis();
        char c;
        // whilst we haven't timed out & haven't reached the end of the body
        while ( (http.connected() || http.available()) &&
               ((millis() - timeoutStart) < kNetworkTimeout) )
        {
            if (http.available())
            {
                c = http.read();
                // Print out this character
                Serial.print(c);
                
        lcd.clear();
                lcd.setCursor(0, 0);
                   lcd.print(" The number called  ");
                lcd.print(c);
                lcd.setCursor(0, 1);
                lcd.print("is: ");
                lcd.print (c);

Any help greatly appreciated.

I think your main problem (amongst others) is the fact that you don't understand how the data is being provided to you.

You are getting data sent as text, yet you are trying to display it as a number.

When sent the value "75" you are being sent the character "7" followed by the character "5", NOT the number 75.

"7" has the decimal value 55, and surprise surprise, "5" has the decimal value 53.

So your "number" 75 is in fact made up of two bytes, 55 and 53, which are being processed by your code completely separately, so it first displays "The number called 7 is 7" which is immediately being replaced by "The number called 5 is 5".

The reason it looks OK on the serial console is because you are just printing the two characters side by side, not as one number. Add some extra character delimiting prints in there and you'll see what I mean:

Serial.print(c);
Serial.print(",");
// -> 7,5,

You need to convert the incoming stream of data into a number, and to do that the Arduino thoughtfully provides a handy little function called "parseInt()", which is part of the Stream class, so all sorts of things have access to it.

int c = http.parseInt();
// c == 75

Thank you for explaining the problem so well.
I understand what was happening and where it went wrong - problem now fixed!

Your time has been very much appreciated.