Skip to main content
added 1 character in body
Source Link
Janw
  • 294
  • 1
  • 9

Even if you want to display time with the seconds showing, you don't need to check the time on the RTC continiously. Once a second should be enough. You can use a timer interrupt that triggers an ISR(Interrupt Service Routine) every second to do that check for you. This will free a lot of time which your arduino can use to do other stuff.

Same goes for your button(s): you can use an External Interrupt (INT) or a Pin Change Interrupt (PCINT) for them. This way the arduino will only look at them when they are pushed (and/or released).

If you combine those two interrupts (for the clock and the button), your arduino will have a lot of spare time. This is especially handhandy if you later want to expand your project with more buttons and motors.

Even if you want to display time with the seconds showing, you don't need to check the time on the RTC continiously. Once a second should be enough. You can use a timer interrupt that triggers an ISR(Interrupt Service Routine) every second to do that check for you. This will free a lot of time which your arduino can use to do other stuff.

Same goes for your button(s): you can use an External Interrupt (INT) or a Pin Change Interrupt (PCINT) for them. This way the arduino will only look at them when they are pushed (and/or released).

If you combine those two interrupts (for the clock and the button), your arduino will have a lot of spare time. This is especially hand if you later want to expand your project with more buttons and motors.

Even if you want to display time with the seconds showing, you don't need to check the time on the RTC continiously. Once a second should be enough. You can use a timer interrupt that triggers an ISR(Interrupt Service Routine) every second to do that check for you. This will free a lot of time which your arduino can use to do other stuff.

Same goes for your button(s): you can use an External Interrupt (INT) or a Pin Change Interrupt (PCINT) for them. This way the arduino will only look at them when they are pushed (and/or released).

If you combine those two interrupts (for the clock and the button), your arduino will have a lot of spare time. This is especially handy if you later want to expand your project with more buttons and motors.

Source Link
Janw
  • 294
  • 1
  • 9

Even if you want to display time with the seconds showing, you don't need to check the time on the RTC continiously. Once a second should be enough. You can use a timer interrupt that triggers an ISR(Interrupt Service Routine) every second to do that check for you. This will free a lot of time which your arduino can use to do other stuff.

Same goes for your button(s): you can use an External Interrupt (INT) or a Pin Change Interrupt (PCINT) for them. This way the arduino will only look at them when they are pushed (and/or released).

If you combine those two interrupts (for the clock and the button), your arduino will have a lot of spare time. This is especially hand if you later want to expand your project with more buttons and motors.