wasp: pinetime: Start an RTC at board board
This commit is contained in:
parent
a70f82cf74
commit
fed9c58205
2 changed files with 7 additions and 2 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit e668ed3ed3778bf5aea08e766cc8d82eb0a4c247
|
Subproject commit b2273b5d22bc4d948b5333b2b82a7be66f62cefd
|
|
@ -1,4 +1,5 @@
|
||||||
from machine import Pin
|
from machine import Pin
|
||||||
|
from machine import RTCounter as RTC
|
||||||
#from machine import Signal
|
#from machine import Signal
|
||||||
from machine import SPI
|
from machine import SPI
|
||||||
|
|
||||||
|
@ -48,6 +49,10 @@ backlight = Backlight(0)
|
||||||
display = Display()
|
display = Display()
|
||||||
backlight.set(1)
|
backlight.set(1)
|
||||||
|
|
||||||
|
# Start measuring time (and feeding the watchdog)
|
||||||
|
rtc = RTC(1, mode=RTC.PERIODIC)
|
||||||
|
rtc.start()
|
||||||
|
|
||||||
battery = Battery(
|
battery = Battery(
|
||||||
Pin('BATTERY', Pin.IN),
|
Pin('BATTERY', Pin.IN),
|
||||||
Signal(Pin('CHARGING', Pin.IN), invert=True),
|
Signal(Pin('CHARGING', Pin.IN), invert=True),
|
||||||
|
|
Loading…
Reference in a new issue