Don't try this at home folks!
I wanted to read temperature and humidity from a basic DHT11 sensor. No big deal then.
I also want a battery version of this to sleep for a while ("while" to be defined) to maximise battery life.
Stupidly, I added code to loop() to put the processor to sleep. I'm used to the 328, not the 32u4. Going to sleep causes the USB to drop out which means if there's a problem in your code then you can't really get back from this with the Arduino IDE.
No big deal, I've already wiped flash using one of Nick Gammon's programs and just need to re-load the bootloader. After doing this, I realised if I'd just read a pin to make the experimental sleepstuff conditional and used a pull up/down resistor then a simple reset and changing the resistor config could have prevented all of this grief. It's probably obvious to most of you but I wish I'd thought of it earlier.
Looking on the bright side, this is stuff I obviously need to learn...
Dave