The connection differs depending on the expansion board you’re using. To use the RTC in either board you need to have a battery or apply power to the proper pins in order for the RTC to work. In the Arduino expansion board you need to look for the header J2. If you’re using the mini breakout board look at J18-pin 5.
In this thread you can see more information on how to configure the RTC RTC 1307 - Real Time Clock in Linux.
Let me know if this helps.
Thank you for your quick reply.
I'm using the mini breakout board. I've already applied power to the RTC pin. My problem is about how to program it. I've looked up in the Mraa library but there is no function related to the RTC module.
I'm thinking about using the RTC to set a timer. So far, I was used to set the frequency of the RTC and generate an interrupt whenever I wanted. The problem here, It's that I do not know any function to set the RTC.
The function to set the RTC clock is called 'date':
Gooogle SIGALRM interrupts.
Here is an example:
now = time(NULL);
printf("Arrange SIGALRM to be delivered in 10 seconds\n");
Were you able to follow Vincenze’s suggestion? Do you still need help with this thread?