Skip to content

Commit 635f01e

Browse files
authored
Merge pull request #449 from pennam/test_RTC-fix
Test_RTC example: change on interrupt PIN to D7
2 parents 8a0bbaa + 34dd6a4 commit 635f01e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: libraries/RTC/examples/Test_RTC/Test_RTC.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// Include the RTC library
1212
#include "RTC.h"
1313

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;
1616

1717
bool periodicFlag = false;
1818
bool alarmFlag = false;
@@ -37,7 +37,7 @@ void setup() {
3737

3838
// Set LED pins as outputs
3939
pinMode(LED_BUILTIN, OUTPUT);
40-
pinMode(LED_ON_INTERRUPT, OUTPUT);
40+
pinMode(PIN_ON_INTERRUPT, OUTPUT);
4141

4242
// Initialize the RTC
4343
RTC.begin();
@@ -83,10 +83,10 @@ void loop() {
8383

8484
// Toggle the LED based on callback state
8585
if (clb_st) {
86-
digitalWrite(LED_ON_INTERRUPT, HIGH);
86+
digitalWrite(PIN_ON_INTERRUPT, HIGH);
8787
}
8888
else {
89-
digitalWrite(LED_ON_INTERRUPT, LOW);
89+
digitalWrite(PIN_ON_INTERRUPT, LOW);
9090
}
9191

9292
clb_st = !clb_st; // Toggle callback state

0 commit comments

Comments
 (0)