Thank you very much for your reply!
let’s assume the Master send request to the slave and slave reply quensquently. The communication works without problem and I implement for this request and reply method a state machine in the main function under while loop. After I integrate my program to yours unfortunatly the program jumps the state machine and build the server communication but the rs485 communication stops.
string& showWebPage(int status)
//roomTemp = ds1820.read();
int main ()
if((Master.readable())) //read Data from Master
d = Master.getc()
if (d == ‘M’)
state = ‘S’;
state = ‘M’;
Slave4 = (Slave4 << 8) | d; //shift the 8bit result to left for Slave 4
if (++counter4 >= 3)
if(Slave4 > 0x7FFFFF)
Slave4 = Slave4|0xFF000000;
S4 = Slave4*0.1;
pc.printf(“Slave4_4 = %.1f\n”, S4); // send the result to com terminal
counter4 = 0;
state = M;
default: state = M;
my problem is to show or update the float S4 value on the web page because i get always 0.0, do you have an idea? or better method ?
thank you for your help and time.