
A simple serial test program for the ISL1208 library.
Diff: main.cpp
- Revision:
- 4:c003cef32315
- Parent:
- 1:e983c454f8be
diff -r 4bde53da5c1e -r c003cef32315 main.cpp --- a/main.cpp Thu Nov 07 18:21:58 2013 +0000 +++ b/main.cpp Tue Nov 12 17:17:07 2013 +0000 @@ -6,9 +6,12 @@ int main() { //Try to open the ISL1208 - if (rtc.open(ISL1208::OSCILLATOR_CRYSTAL)) { + if (rtc.open()) { printf("Device detected!\n"); + //Configure the oscillator for a 32.768kHz crystal + rtc.oscillatorMode(ISL1208::OSCILLATOR_CRYSTAL); + //Check if we need to reset the time if (rtc.powerFailed()) { //The time has been lost due to a power complete power failure