When you compile the code, the linker adds code from all the libraries you used, but a good linker will ignore any part of the library that doesn't actually get executed. When you used the '%s' target, the linker was able to ignore all of 'sprint()'s floating point conversion code, but when you switched to '%f', it was forced to include it.
Try this:
Code: Select all
sprintf(
buffer,
"GET /submit.php?temp=%d.%d&hum=%d.%d&light=%d HTTP/1.0",
(int)t, (int)(t * 10) % 10,
(int)h, (int)(h * 10) % 10,
l
);