![background image](http://html1.mh-extra.com/html/velleman/vma301/vma301_user-manual_4004816005.webp)
VMA301
V. 02 – 14/05/2018
5
©Velleman nv
// Print the formatted string to serial so we can see the time.
Serial.println(buf);
}
} // namespace
void setup() {
Serial.begin(9600);
// Initialize a new chip by turning off write protection and clearing the
// clock halt flag. These methods needn't always be called. See the DS1302
// datasheet for details.
rtc.writeProtect(false);
rtc.halt(false);
// Make a new time object to set the date and time.
// Sunday, September 22, 2013 at 01:38:50.
Time t(2018, 5, 10, 15, 8, 50, Time::kThursday);
// Set the time and date on the chip.
rtc.time(t);
}
// Loop and print the time every second.
void loop() {
printTime();
delay(1000);
}
8.
More Information
Please refer to the VMA301 product page on www.velleman.eu for more information.
Use this device with original accessories only. Velleman nv cannot be held responsible in the event
of damage or injury resulting from (incorrect) use of this device. For more info concerning this
product and the latest version of this manual, please visit our website www.velleman.eu. The
information in this manual is subject to change without prior notice.
© COPYRIGHT NOTICE
The copyright to this manual is owned by Velleman nv. All worldwide rights reserved.
No part of this
manual may be copied, reproduced, translated or reduced to any electronic medium or otherwise without the
prior written consent of the copyright holder.