Wake up PyBoard

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Posts: 2
Joined: Tue Jan 16, 2018 4:50 pm

Wake up PyBoard

Post by Robert » Fri Aug 24, 2018 12:32 pm


Is there another way to wake up PyBoard in stop or standby mode?

import pyb
rtc = pyb.RTC()
rtc.wakeup(1000) # wakeup every 1000 ms (1 second)
while True:

Thank you

Posts: 252
Joined: Sun Apr 17, 2016 1:55 pm

Re: Wake up PyBoard

Post by shaoziyang » Sat Aug 25, 2018 4:41 am

In standby mode, the only way to wake pyboard is reset. In stop mode, you may use RTC or pin level irq to wake it.

Code: Select all

def pin1_irq(t):
	#do something

pin1 = Pin(Pin('B0'), Pin.IN)
pin1.irq(handler=pin1_irq, trigger=Pin.IRQ_FALLING)

User avatar
Posts: 3421
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: Wake up PyBoard

Post by pythoncoder » Sat Aug 25, 2018 4:50 am

Yes. For ways to wake from standby and more information on building low power systems I suggest you look at this repo. Standby has the characteristic that program state is lost: it behaves similarly to a soft reset. This limits its application areas.

Waking from stop is much more versatile, because program state can be retained while stopped. My fork of uasyncio here provides a module which enables any asynchronous application to stop for a period and resume where it left off. There is a demo lpdemo.py which waits for a button press with low power consumption, retaining program state.
Peter Hinch

Post Reply