client.print() not showing up on web

Hello everyone, i am not new to the arduino world but i am fairly new to the web interfacing with the arduino.

I'm currently trying to renovate a really old project of my dad's that includes controlling several relays over the internet. He was doing it via remote desktop and an old PLC but we decided to make it prettier and smarter so i started incorporating it with arduino.

After many many mishaps and unfortunate events...i finally have a working entity which i designed on an arduino UNO + Ethernet shield. The problem is that the UNO has way less digital pins than what i need so i needed to move over to the Mega. This is where things get weird........

The point of the project is that there are 7 output pins that control the relays and 9 input pins that monitor the system's States. Those 9 State variables are being printed on the website using client.print(). Everything works fine on the UNO but when i move over to the Mega the States are not printed at all...

I am frustrated to the point of nervous breakdown at this point because i have been trying to fix this for over 2 weeks to no avail...PLEASE help!

index.txt (5.71 KB)

MyTry.ino (14.4 KB)

roofLeftDiv is 3?
10 milliseconds delay on distance sensor? it should be 10 microseconds.

use reference as parameter, not a copy
void XML_response(EthernetClient& cl)

C has memset and strstr
but why clear the buffer?

webserver in my project

Hi Juraj you might be perfectly right on all those things...but the thing is, you are not addressing the issue as non of these things seems to be a problem on the UNO so why should it on the MEGA ?

StelNiko:
Hi Juraj you might be perfectly right on all those things...but the thing is, you are not addressing the issue as non of these things seems to be a problem on the UNO so why should it on the MEGA ?

try some basic example of the Ethernet library (the 2.00 version). they diagnose basic things