I’ve added some new code to the wireless LCD Display and my Raspberry PI to set the time on the wireless LCD display correctly and regularly.
The wireless LCD Display has a DS1307 RTC connected but it is not the most accurate so time will shift after a while. The Arduino time library has an example on how to set the time using the serial port (usb) of the Arduino. That is to much hassle to do each time.
I use the Raspberry Pi with a Python script to calculate the UNIX time and send it over LAN to my Domotica Gateway. The Domotica Gateway can communicate over wireless with the wireless LCD Display. The UNIX time string is send to the wireless LCD display which will update the time on the DS1307 RTC. The python script runs every hour using the crontab. (could be much less but it won’t hurt)
Although my setup is very specific, you might find the python code useful.
[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”]
I use THIS library for time on the wireless LCD display. The specific Arduino code to update the RTC and set the time:
RTC.set(inData_8.time); //inData_8.time is the value send by the domotica gateway