P
@kjm This is indeed a major issue in debugging when using deepsleep.
As soon as the system goes to sleep the USB connection and WiFi connection are gone.
You then have to reconnect manuually first. As you describe, Atom is then also a major issue as the butons disappear and it thinks it is not fully connected while it is.
This makes checking the functionality of a program using sleep very difficult. The only solution I found is using blinking LEDs of several colors to communicate with me the debugger. I am also busy with a logger which writes the state of the program to a file for later inspection.
def blink(color, counts, intensity=0x1f, speed=0.5):
colors = {
"red": 0xFF0000,
"green": 0x00FF00,
"blue": 0x0000FF,
"yellow": 0xFFFF00
}
pycom.rgbled(0x000000)
for i in range(counts):
col = colors.get(color, 0xFFFFFF)
col = int(col * intensity / 255.0)
pycom.rgbled(col)
time.sleep(speed)
pycom.rgbled(0) # off
time.sleep(speed)
def blink_long(color):
pycom.rgbled(color)
time.sleep(4)
pycom.rgbled(0)