problem with POST sent from microcontroller to web server PHP

Add an else block after the if block. Is $_POST actually empty?

If not, iterate through the $_POST array and see what is actually in it.