ciao nel seguente codice faccio una tabella su una pagina web per impostare le ore di accensione di una lampada. sono solo all'inizio. non riesco a sostituire nella prima riga della tabella il testo PIPPO con una variabile. qualcuno mi puà per cortesia dire come trasformo la variabile i in stringa e poi la concateno con il testo <TD>?
Grazie
uint16_t light_webpage(uint8_t *buf)
{
int i=0;
uint16_t plen;
plen=es.ES_fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><p><h1>Illuminazione</h1></p> "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<hr><br>"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<TABLE BORDER=1>"));
for (int i=0; i <= 23; i++)
{
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<COL WIDTH=20>"));
}
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<TR>"));
for (int i=0; i <= 23; i++)
{
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<TD>PIPPO"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("</TD>"));
}
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("</TR>"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<TR>"));
for (int i=0; i <= 23; i++)
{
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<TD>2"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("</TD>"));
}
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("</TR>"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("</TABLE>"));
return(plen);
}