We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8a0bbaa + 34dd6a4 commit 635f01eCopy full SHA for 635f01e
libraries/RTC/examples/Test_RTC/Test_RTC.ino
@@ -11,8 +11,8 @@
11
// Include the RTC library
12
#include "RTC.h"
13
14
-// Define the interrupt pin for LED control during interrupts
15
-const int LED_ON_INTERRUPT = 22;
+// Define the pin to toggle on interrupt
+const int PIN_ON_INTERRUPT = D7;
16
17
bool periodicFlag = false;
18
bool alarmFlag = false;
@@ -37,7 +37,7 @@ void setup() {
37
38
// Set LED pins as outputs
39
pinMode(LED_BUILTIN, OUTPUT);
40
- pinMode(LED_ON_INTERRUPT, OUTPUT);
+ pinMode(PIN_ON_INTERRUPT, OUTPUT);
41
42
// Initialize the RTC
43
RTC.begin();
@@ -83,10 +83,10 @@ void loop() {
83
84
// Toggle the LED based on callback state
85
if (clb_st) {
86
- digitalWrite(LED_ON_INTERRUPT, HIGH);
+ digitalWrite(PIN_ON_INTERRUPT, HIGH);
87
}
88
else {
89
- digitalWrite(LED_ON_INTERRUPT, LOW);
+ digitalWrite(PIN_ON_INTERRUPT, LOW);
90
91
92
clb_st = !clb_st; // Toggle callback state
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments