// prepare the webpage by writing the data to the tcp send buffer
uint16_t print_webpage(uint8_t *buf)
{ uint16_t plen;
plen=http200ok();
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("Napeti na panelech: ")); // input A0 Nap?tí na panelech
itoa(analogRead(A0)/100,numstr_a,10); // convert integer to string
{plen=es.ES_fill_tcp_data(buf,plen,numstr_a); //writing values ??to the web
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR(" V
") //zápis veli?iny
I would use the command string to me it listed values ??beyond the decimal point. Pr it works patch from this page. But I do not know how to create syntax.
Thank you for your help with the syntax and the draft code. Alternatively, for advice on how to solve the problem without the patch.
PS. Excuse my Englis
itoa(analogRead(A0)/100,numstr_a,10); // convert integer to string
It will NOT fit! The analogRead() function can return a value as large as 1023. Dividing that by 100 will result in a value between 0 and 10. That will require at least a 3 element buffer - not a 1 element buffer.
I would use the command string to me it listed values ??beyond the decimal point.
An integer divided by an integer is an integer. There are no values beyond the (non-existent) decimal point.
Even if you change the division operation to divide by 10.0, the resulting float will be truncated to an int when you pass it to a function (itoa()) that expects an int.
Hello
So pick up a field value to 3, reduce the value of the division (I need to have information about 9V at intersections such as 9V 8.9 V, 9.1 V, etc. - electronically edit it is not a problem) but with the transfer nevím.Co propose to show? Change the itoa for ..... Please Consult
So pick up a field value to 3, reduce the value of the division (I need to have information about 9V at intersections such as 9V 8.9 V, 9.1 V, etc. - electronically edit it is not a problem) but with the transfer nevím.Co propose to show? Change the itoa for ..... Please Consult
Perhaps what you need to consult is someone who speaks English.
Yes I apologize for my English helps me google translator. I need help converting to be able to display values ??for decimal point.
It is suitable for this use the patch to the string value, and how.
Or any other solution? Please be sure to write me a code example that would work. Thank you.