Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
user:kluong:low_power_design_considerations [2020/04/28 03:41] kluong |
user:kluong:low_power_design_considerations [2021/09/19 21:59] (current) |
||
---|---|---|---|
Line 34: | Line 34: | ||
* https://lowpowerlab.com/shop/index.php?_route_=Moteino/moteino-r4 | * https://lowpowerlab.com/shop/index.php?_route_=Moteino/moteino-r4 | ||
* https://www.rocketscream.com/blog/product/mini-ultra-8-mhz-arduino-compatible/ | * https://www.rocketscream.com/blog/product/mini-ultra-8-mhz-arduino-compatible/ | ||
+ | * https://learn.sparkfun.com/tutorials/reducing-arduino-power-consumption/all | ||
+ | |||
+ | |||
+ | ====== Example main ====== | ||
+ | |||
+ | Using the low power library, here is what the loop function looks like: | ||
+ | |||
+ | <code> | ||
+ | sleep_counter++; | ||
+ | LowPower.idle(SLEEP_4S, ADC_OFF, TIMER2_OFF, TIMER1_OFF, TIMER0_OFF, | ||
+ | SPI_OFF, USART0_OFF, TWI_OFF); | ||
+ | if(sleep_counter % 15 == 0){ | ||
+ | board.sample(&board); | ||
+ | } | ||
+ | </code> | ||