move example to Bluefruit52Lib/Hardware, update example with float for readability

This commit is contained in:
hathach committed 2023-11-30 16:34:15 +07:00
1 parent a71a669343
commit 145041c4e9
3 files changed
+7 -11

No files matched your search

@@ -16,7 +16,10 @@ void setup() {
void loop() {
nrfx_temp_measure(); // In blocking mode: this function waits until the measurement is finished.
int32_t raw_temp = nrfx_temp_result_get();
Serial.println(nrfx_temp_calculate(raw_temp));
float temp_c = raw_temp / 4.0;
Serial.print(temp_c);
Serial.println(" C");
delay(1000);
}
@@ -9,7 +9,9 @@ nrfx_temp_config_t config = NRFX_TEMP_DEFAULT_CONFIG;
// this function is called when the temperature measurement is ready
void temp_handler(int32_t raw_temp) {
Serial.println(nrfx_temp_calculate(raw_temp));
float temp_c = raw_temp / 4.0;
Serial.print(temp_c);
Serial.println(" C");
}
void setup() {
@@ -1,9 +0,0 @@
name=nrfx examples
version=1.0
author=Neotje
maintainer=Neotje <neotje111@gmail.com>
sentence=Examples for the Adafruit nRF52 Arduino platform using nrfx
paragraph=Examples for the Adafruit nRF52 Arduino platform using nrfx
category=other
url=https://github.com/adafruit/Adafruit_nRF52_Arduino
architectures=*