# Can you put a Badger 2040 to sleep and wake on timeout or button press?

**URL:** <https://forums.pimoroni.com/t/can-you-put-a-badger-2040-to-sleep-and-wake-on-timeout-or-button-press/21705>\
**Category:** Support\
**Created:** [March 13, 2023, 3:38pm UTC](https://forums.pimoroni.com/t/can-you-put-a-badger-2040-to-sleep-and-wake-on-timeout-or-button-press/21705 "2023-03-13T15:38:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewRump](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/andrewrump/32/8787_2.png) [@AndrewRump](https://forums.pimoroni.com/u/AndrewRump)\
**Post date:** [March 13, 2023, 3:38pm UTC](https://forums.pimoroni.com/t/can-you-put-a-badger-2040-to-sleep-and-wake-on-timeout-or-button-press/21705/1 "2023-03-13T15:38:43Z")

</div>

badger2040::halt will halt completely but can be woken by a buttonpress.  
Using sleep() just puts the Badger2040 to sleep until the time expires.  
I need something which sleep until the time expires OR a button is pressed.

---

<div class="post-metadata">

**Author:** ![hel](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hel/32/6075_2.png) [@hel](https://forums.pimoroni.com/u/hel)\
**Post date:** [March 14, 2023, 4:07pm UTC](https://forums.pimoroni.com/t/can-you-put-a-badger-2040-to-sleep-and-wake-on-timeout-or-button-press/21705/2 "2023-03-14T16:07:59Z")

</div>

It’s not possible to wake up from hardware sleep on a timer with the original Badger 2040 - it doesn’t have an additional RTC to keep track of the time when the RP2040 is powered down. Badger 2040 W does though!

---

<div class="post-metadata">

**Author:** ![AndrewRump](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/andrewrump/32/8787_2.png) [@AndrewRump](https://forums.pimoroni.com/u/AndrewRump)\
**Post date:** [March 17, 2023, 1:46pm UTC](https://forums.pimoroni.com/t/can-you-put-a-badger-2040-to-sleep-and-wake-on-timeout-or-button-press/21705/3 "2023-03-17T13:46:55Z")

</div>

Yeah I realized that after making this post - and have ordered one.
