Skip to content

Commit 145041c

Browse files
committed
move example to Bluefruit52Lib/Hardware, update example with float for readability
1 parent a71a669 commit 145041c

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

libraries/nrfx_examples/examples/nrfx_temp_blocking/nrfx_temp_blocking.ino renamed to libraries/Bluefruit52Lib/examples/Hardware/temp_measure_blocking/temp_measure_blocking.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ void setup() {
1616
void loop() {
1717
nrfx_temp_measure(); // In blocking mode: this function waits until the measurement is finished.
1818
int32_t raw_temp = nrfx_temp_result_get();
19-
Serial.println(nrfx_temp_calculate(raw_temp));
19+
float temp_c = raw_temp / 4.0;
20+
21+
Serial.print(temp_c);
22+
Serial.println(" C");
2023

2124
delay(1000);
2225
}

libraries/nrfx_examples/examples/nrfx_temp_non-blocking/nrfx_temp_non-blocking.ino renamed to libraries/Bluefruit52Lib/examples/Hardware/temp_measure_non_blocking/temp_measure_non_blocking.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ nrfx_temp_config_t config = NRFX_TEMP_DEFAULT_CONFIG;
99

1010
// this function is called when the temperature measurement is ready
1111
void temp_handler(int32_t raw_temp) {
12-
Serial.println(nrfx_temp_calculate(raw_temp));
12+
float temp_c = raw_temp / 4.0;
13+
Serial.print(temp_c);
14+
Serial.println(" C");
1315
}
1416

1517
void setup() {

libraries/nrfx_examples/library.properties

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)