Thank you very much for the replies!
the reason I started to think about interrupts and why 1000ms:
- I wanted to be free of concerning how busy my loop() will ever be.
- Suppose it happens that I read RTC (when not using it in a way that it interrupts Arduino) in the middle of the second. Next read I update the display for the change in a second. So if I observe my display of Arduino, I’d perhaps precive a lag of updating this LCD with world clock right? Also, what if loop() gets too busy because of reading sensors, user input (IR-remote, etc.) or any other I/O busyness. I was thinking how to get to freedom of calculating how long it takes so my loop() repeats.
- I didn’t know that if I check every 1000ms theen 999 of reading will miss the time change. Now buy reading every one’s reply, I think that what El_supremo suggested is the way to go, using SQW to interrupt Ar2, but then, on Software-Serial tutorials it is written that if to use interrupts together with this lib, there maybe newbee-killing bugs!
Why 2 Arduinos:
Well, you could see by the phohto I uploaded that one Arduino_1 gives nearly all of its pins to the LCD (which yet has a touch screen). It will be loaded with LCD driver and also my code to read touch screen, get user input, etc. I didn’t calculate how much code there will be, but I wanted to open myself just a plenty of room having 2 Arduinos
Reading your kind reply I got to think if it is ever possible to use a pin for two purposes? I mean, is it possible to:
x) connect LCD pin and another sensor to the same pin
y) let Arduino use the pin to load LCD
z) reuse the pin, set it as input, read the sensor (but I don’t know how then to get it back to LCD!)
Why two Arduinos?
Reasons above must make it clear why I was thinking so, anything more needed I’d be happy to explain.
why put the rtc on Arduino2 if the data is needed on Arduino1?
Because of Ar1’s pins are (nearly) all connected to the LCD. I still don’t know, if I could ever connect 1 Arduino pin to say 2 sensors, reassigning it in code and reuse it with different purposes.
This is my Arduino_1: