To verify the Real Time Clock chip is correctly hooked-up, run the I2C Scanner sketch. It will show one, two, sometimes three I2C bus addresses in use.
The DS1307 address is 0x68.
Some boards have an EEPROM built on the board The 24C32’s address is 0x50.
Some boards also have a DS18B20 one wire interface. Its address is 0x20.
Maybe the Gauge Widget class needs to be refactored to be a round indicator class that has more “child classes” besides gauges. That round indicator class would include dials, clocks, compass roses and pi charts, etc. (these go 360 degrees around instead of 240) Besides different faces, some simply need different pointers (like the compass and pi chart), some may need need multiple pointers like clocks.
For example …
round indicator has a face and multiple pointers
a gauge has a 140 degree face marked min value to max value and a single pointer (value)
a dial has a 360 degree face marked min value to max value and a single pointer (value)
a compass has a 360 degree face marked N, E, S, W at major ticks at 90 degrees, and minor ticks at 30 deg and a single pointer (degrees)
a clock has a 360 degree face and three pointers (seconds, minutes and hours)
a pie chart has a 360 degree face and N pie shaped pointers.
Here is a sketch for MicroView that shows the time on the first line and the date on the second line:
#include <MicroView.h>
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC; // creates an instance of RTC
void setup () {
Wire.begin();
RTC.begin();
if (! RTC.isrunning()) {
//The following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}
uView.begin(); // init and start MicroView
uView.clear(PAGE); // erase the memory buffer
}
void loop () {
int i;
DateTime now = RTC.now();
uView.setFontType(0); // set font type 1
uView.setCursor(0,0); // points cursor to first line
i = now.hour();
if (i<10) uView.print("0");
uView.print(i, DEC);
uView.print(":");
i = now.minute();
if (i<10) uView.print("0");
uView.print(i, DEC);
uView.print(":");
i = now.second();
if (i<10) uView.print("0");
uView.print(i, DEC);
uView.setCursor(0,16); // points cursor to second line
i = now.month();
if (i<10) uView.print("0");
uView.print(i, DEC);
uView.print('/');
i = now.day();
if (i<10) uView.print("0");
uView.print(i, DEC);
uView.print('/');
uView.print(now.year(), DEC);
uView.display();
delay(600);
}