diff --git a/micropython b/micropython index e668ed3..b2273b5 160000 --- a/micropython +++ b/micropython @@ -1 +1 @@ -Subproject commit e668ed3ed3778bf5aea08e766cc8d82eb0a4c247 +Subproject commit b2273b5d22bc4d948b5333b2b82a7be66f62cefd diff --git a/wasp/boards/pinetime/watch.py b/wasp/boards/pinetime/watch.py index 0d0fa4b..d6a8210 100644 --- a/wasp/boards/pinetime/watch.py +++ b/wasp/boards/pinetime/watch.py @@ -1,4 +1,5 @@ from machine import Pin +from machine import RTCounter as RTC #from machine import Signal from machine import SPI @@ -12,7 +13,7 @@ class Display(ST7789_SPI): spi = SPI(0) # Mode 3, maximum clock speed! spi.init(polarity=1, phase=1, baudrate=8000000) - + # Configure the display cs = Pin("DISP_CS", Pin.OUT) dc = Pin("DISP_DC", Pin.OUT) @@ -48,6 +49,10 @@ backlight = Backlight(0) display = Display() backlight.set(1) +# Start measuring time (and feeding the watchdog) +rtc = RTC(1, mode=RTC.PERIODIC) +rtc.start() + battery = Battery( Pin('BATTERY', Pin.IN), Signal(Pin('CHARGING', Pin.IN), invert=True),