File tree 1 file changed +5
-5
lines changed
libraries/RTC/examples/Test_RTC
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11
11
// Include the RTC library
12
12
#include " RTC.h"
13
13
14
- // Define the interrupt pin for LED control during interrupts
15
- const int LED_ON_INTERRUPT = 22 ;
14
+ // Define the pin to toggle on interrupt
15
+ const int PIN_ON_INTERRUPT = D7 ;
16
16
17
17
bool periodicFlag = false ;
18
18
bool alarmFlag = false ;
@@ -37,7 +37,7 @@ void setup() {
37
37
38
38
// Set LED pins as outputs
39
39
pinMode (LED_BUILTIN, OUTPUT);
40
- pinMode (LED_ON_INTERRUPT , OUTPUT);
40
+ pinMode (PIN_ON_INTERRUPT , OUTPUT);
41
41
42
42
// Initialize the RTC
43
43
RTC.begin ();
@@ -83,10 +83,10 @@ void loop() {
83
83
84
84
// Toggle the LED based on callback state
85
85
if (clb_st) {
86
- digitalWrite (LED_ON_INTERRUPT , HIGH);
86
+ digitalWrite (PIN_ON_INTERRUPT , HIGH);
87
87
}
88
88
else {
89
- digitalWrite (LED_ON_INTERRUPT , LOW);
89
+ digitalWrite (PIN_ON_INTERRUPT , LOW);
90
90
}
91
91
92
92
clb_st = !clb_st; // Toggle callback state
You can’t perform that action at this time.
0 commit comments