Close

Programming

A project log for LP Mini - Low Power Dev Board

Inexpensive, Arduino Compatible Low Power Dev Board

maxkMax.K 11/19/2016 at 17:410 Comments

Without proper code the LP mini is nothing more than a regular Arduino Mini with an on board RTC. To make use of the new features, I started working on a simple library.

The library currently allows you to set and read the time from the MCP79410. For storing the time variables (seconds, minutes, etc.) a struct filetype is used. An additionally function can be used to wake the device in 1 to 60 seconds. I am planning on expanding this to minutes, hours and even days. It's just a matter of setting the right registers.

Besides using the library functions the interrupt needs to be configured using:

attachInterrupt(0, interruptHandler, FALLING);
After setting up the RTC the sleep mode needs to be engaged:
LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);

This makes use of the LowPower library by rocketscream (https://github.com/rocketscream/Low-Power)

My library including an example is available on github: https://github.com/CoretechR/lpmini

This is the first time I am making a library for Arduino, so don't expect too much.

Discussions