File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
examples/nrfx_temp_non-blocking Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
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
+ // this function is called when the temperature measurement is ready
11
+ void temp_handler (int32_t raw_temp) {
12
+ Serial.println (nrfx_temp_calculate (raw_temp));
13
+ }
14
+
15
+ void setup () {
16
+ Serial.begin (9600 );
17
+ nrfx_temp_init (&config, &temp_handler);
18
+ }
19
+
20
+ void loop () {
21
+ nrfx_temp_measure ();
22
+
23
+ delay (1000 );
24
+ }
Original file line number Diff line number Diff line change
1
+ name =nrfx examples
2
+ version =1.0
3
+ author =Neotje
4
+ maintainer =Neotje <
[email protected] >
5
+ sentence =Examples for the Adafruit nRF52 Arduino platform using nrfx
6
+ paragraph =Examples for the Adafruit nRF52 Arduino platform using nrfx
7
+ category =other
8
+ url =https://github.com/adafruit/Adafruit_nRF52_Arduino
9
+ architectures =*
You can’t perform that action at this time.
0 commit comments