Skip to content

Commit d7402eb

Browse files
committed
additional error logging
1 parent b48b94b commit d7402eb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

code.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
## URL
5050
HEATSEEK_URL = "http://relay.heatseek.org/temperatures"
51-
CODE_VERSION = "F-CP-1.1.1"
51+
CODE_VERSION = "F-CP-1.1.2"
5252
VOLT_DIFF_FOR_CHARGE = 0.06
5353
QUIET_MODE_SLEEP_LENGTH = 600
5454

@@ -441,8 +441,11 @@ def fade_up_status(red=128, green=128, blue=128, fade_length=2, repeat=1):
441441
deep_sleep(reading_interval)
442442
except Exception as e: # Typically when the filesystem isn't writeable...
443443
flash_warning()
444-
print("\nWARN: not writing temp to file, or sending to Heat Seek")
445-
print("This is likely because sensor is not attached and the filesystem was writable by USB")
444+
print("\nEXCEPTION: Final Try/Exception block triggered")
445+
print('\nError message: {}'.format(e))
446+
print("\nnot writing temp to file, or sending to Heat Seek")
447+
print("This is usually because sensor is not attached and the filesystem was writable by USB")
448+
print("NOTE: This can also happen if you plug in the sensor after the USB cord or battery, without resetting")
446449
print("If this is unexpected, be sure you reset the feather after plugging in the sensor to run boot.py again.")
447450
print('Deep sleep for reading interval ({}) and try again'.format(reading_interval))
448451
deep_sleep(reading_interval)

0 commit comments

Comments
 (0)