![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
A blinky variation for the mBuino with a bunch of different blink modes, deep-sleeping between iterations.
Dependencies: Crypto RNG mbed WakeUp
Fork of mBuinoBlinky by
mBuino blinky experiments.
Diff: main.cpp
- Revision:
- 10:8a901b6d8cfa
- Parent:
- 9:7ae675372031
- Child:
- 11:be76674d2dbd
--- a/main.cpp Sat Sep 06 02:44:07 2014 +0000 +++ b/main.cpp Mon Sep 08 01:20:52 2014 +0000 @@ -6,6 +6,13 @@ int rndLED = 0; Random RNG = Random(); +void myDeepSleep() { + LPC_PMU->PCON = 0x1; + SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; + LPC_SYSCON->PDAWAKECFG &= 0xFFFFF800; + __WFI(); +} + void sweep(float delayTime) { for(int x=0; x<7; x++) @@ -138,5 +145,6 @@ pileMode(0.05); sweep(0.05); multiSweepMode(0.05); + myDeepSleep(); } }