The Things Node : new low power library development

The datasheet of the 32u4 states that is is possible to disable the regulator in software. I am unable to test it at the moment, but setting the clearing the UVREGE bit in the UHWCON register detaches the regulator from the pin. The code would be:
UHWCON &= 0xFE;

See figure 21-1 from the complete Atmega32u4 datasheet. This will disable the usb section, so I recommend to implement it in the deepsleep() method in the Things Node arduino library. The deepsleep method is only called if no usb cable is attached. When waking up the regulator can be enabled again with: UHWCON |= 0x01;