Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
RTC: change on interrupt PIN to D7
  • Loading branch information
pennam committed Feb 26, 2025
commit 34dd6a4bd624e29c6168fcb03bd09ef60c1614c5
10 changes: 5 additions & 5 deletions libraries/RTC/examples/Test_RTC/Test_RTC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// Include the RTC library
#include "RTC.h"

// Define the interrupt pin for LED control during interrupts
const int LED_ON_INTERRUPT = 22;
// Define the pin to toggle on interrupt
const int PIN_ON_INTERRUPT = D7;

bool periodicFlag = false;
bool alarmFlag = false;
Expand All @@ -37,7 +37,7 @@ void setup() {

// Set LED pins as outputs
pinMode(LED_BUILTIN, OUTPUT);
pinMode(LED_ON_INTERRUPT, OUTPUT);
pinMode(PIN_ON_INTERRUPT, OUTPUT);

// Initialize the RTC
RTC.begin();
Expand Down Expand Up @@ -83,10 +83,10 @@ void loop() {

// Toggle the LED based on callback state
if (clb_st) {
digitalWrite(LED_ON_INTERRUPT, HIGH);
digitalWrite(PIN_ON_INTERRUPT, HIGH);
}
else {
digitalWrite(LED_ON_INTERRUPT, LOW);
digitalWrite(PIN_ON_INTERRUPT, LOW);
}

clb_st = !clb_st; // Toggle callback state
Expand Down
Loading