ROBOTIS-GIT / OpenCR

Software for ROS Embedded board (a.k.a. OpenCR). OpenCR means Open-source Control Module for ROS.
Apache License 2.0
383 stars 238 forks source link

Offline time sync help #317

Open fabiocyro opened 1 year ago

fabiocyro commented 1 year ago

Hi, I have a turtlebot3 and I would like to run the SLAM without having to be connected to the internet. But the raspberry pi does not get the current time if it is not connected to internet as everyone knows.

The thing is that I have a RTC module that can be attached to the OpenCR, and my question is:

Can I connect this module to the OpenCR in order to update the time for the rasperry?

I have no idea if this is possible, but if yes, can someone help me?

johnauld commented 1 year ago

The OpenCR has its own RTC built into the SoC. There's a tiny plug near the reset button where you can attach a 2032-type coin cell to maintain the time when the board is powered off, and there's library support. There's some example code in .../libraries/OpenCR/examples/10. Etc/rtc_time. The actual API is defined in .../variants/OpenCR/hw/driver/drv_rtc.h.