I have a bunch of Atmega16A MCUs laying around so I want to use them with an ESP8266 to relay temperature and such in each room of my home to a server. The thing is, if I need to update the firmware on them, I need to take the device from that room to a different one to update the firmware.
The issue is once i plug in the programmer, it will supply power to the controller and it'll start detecting the temp of the room and tell the server the room it was in is the temp of the room it is currently in. The server doesn't know the difference so it'll skew my results and such.
So is there some way I can detect when the ICSP 6-pin header has the programmers cable connected? Just some simple thing that will tell the controller, "Hey we may not be in the right room, don't tell the server any measurements"