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 54ec2bf + ca3cdc2 commit a433e99Copy full SHA for a433e99
examples/ESP32/RTC_counter/RTC_counter.ino
@@ -0,0 +1,18 @@
1
+#include "Arduino.h"
2
+#include "soc/rtc.h"
3
+
4
+/*rtc_time_get() return the RTC counters
5
+* the board using internal 150KHz RTC, but it's not accurate.
6
+*/
7
+void setup() {
8
+ // put your setup code here, to run once:
9
+ Serial.begin(115200);
10
+}
11
12
+void loop() {
13
+ uint64_t rtc_counter1 = rtc_time_get();
14
+ delay(1000);
15
+ uint64_t rtc_counter2 = rtc_time_get();
16
17
+ Serial.println((uint32_t)(rtc_counter2-rtc_counter1));
18
0 commit comments