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.
1 parent c0ad3cf commit ab62290Copy full SHA for ab62290
libraries/nrfx_examples/examples/nrfx_temp_blocking/nrfx_temp_blocking.ino
@@ -0,0 +1,22 @@
1
+/*
2
+ This is example usage of the nrfx_temp driver
3
+*/
4
+
5
+#include <nrfx_temp.h>
6
+#include <Adafruit_TinyUSB.h>
7
8
+nrfx_temp_config_t config = NRFX_TEMP_DEFAULT_CONFIG;
9
10
+void setup() {
11
+ Serial.begin(9600);
12
+ // setting the handler to NULL will initialize the driver in blocking mode
13
+ nrfx_temp_init(&config, NULL);
14
+}
15
16
+void loop() {
17
+ nrfx_temp_measure(); // In blocking mode: this function waits until the measurement is finished.
18
+ int32_t raw_temp = nrfx_temp_result_get();
19
+ Serial.println(nrfx_temp_calculate(raw_temp));
20
21
+ delay(1000);
22
0 commit comments