Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:e7337a59d2ff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Sep 06 09:18:32 2021 +0000
@@ -0,0 +1,28 @@
+// Capteur température
+
+#include "mbed.h"
+#include "HDC1080.h"
+
+Serial bluetooth(p9,p10);
+
+
+int main()
+{
+ // Declarations
+ PinName D_SDA;
+ PinName D_SCL;
+ HDC1080 TH_Sensor(D_SDA,D_SCL);
+ float temperature;
+ int signature;
+
+ // Instructions
+ signature = TH_Sensor.ReadSignature();
+ bluetooth.printf("Manufacturer ID : %d \r\n ", signature);
+
+ while(1)
+ {
+ temperature = TH_Sensor.readTemperature();
+ bluetooth.printf(" Temperature C=%0.3f ", temperature);
+ wait(2);
+ }
+}