Skip to content

Test_RTC example: change on interrupt PIN to D7 #449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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