0

How to set computer time on Arduino Uno, and then control it (Arduino) with Serial monitor. For example show time on LCD.

I have no idea, how to make it using Arduino IDE. So, maybe I can write code in IDE, then load on Arduino. And with some script run Serial monitor also sending current time?

P.S. I have no additional boards like RTC or Ethernet.

  • 2
    I’d suggest using Processing for the part of the code that runs on the computer. Have the processing code communicate with the Arduino over serial – Gerben May 17 '18 at 16:39
  • Are you planning on having the computer send the time to the Arduino every second? Have you considered the delay between the time changing and the time being displayed? Why not get a $0.2 RTC chip and interface to that, it would be much easier. – Code Gorilla May 18 '18 at 9:21
  • nah, answer for my situation is small python script communicating with serial. I thought, that only IDE can communicate with serial – koshachok May 18 '18 at 9:59
1

A good place to start would be the "TimeSerial" sketch that comes with the Arduino Time library: https://playground.arduino.cc/Code/Time.

  • as i understand you are saying about TZ_adjust = 5.5; d = $(date + % s); t = $(echo "60*60*$TZ_adjust/1" | bc); echo T$(echo $d + $t | bc ) > / dev / ttyACM0. But as I understand it will just send message to serial, but how will I open this monitor? – koshachok May 17 '18 at 16:34
  • The Ardunio IDE comes with a serial monitor. You would open the monitor then send the following command (The letter "T" followed by the Unix timestamp) to set the date/time: T1357041600 = Jan 1, 2013. – VE7JRO May 17 '18 at 16:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.