You have declared those functions inside the loop function. C++ does not permit nested functions - move them outside loop, like your getTemperature function. Mind you, since they only consist of a single statement each, you might just get rid of the functions and leave the digitalwrite statements that they contain.