[riot-notifications] [RIOT-OS/RIOT] drivers/ds75lx: add basic driver for temperature sensor (#11505)

Alexandre Abadie notifications at github.com
Thu May 16 15:21:59 CEST 2019


aabadie commented on this pull request.



> +    puts("Initialization successful\n");
+
+    printf("\n+--------Starting Measurements--------+\n");
+    int16_t temperature;
+    while (1) {
+        ds75lx_wakeup(&dev);
+        /* Get temperature in degrees celsius */
+        ds75lx_read_temperature(&dev, &temperature);
+        ds75lx_shutdown(&dev);
+
+        bool negative = (temperature < 0);
+        if (negative) {
+            temperature = -temperature;
+        }
+
+        printf("Temperature [°C]: %c%d.%d\n",

Good spot :+1: !

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11505#discussion_r284702379
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190516/48c27298/attachment.html>


More information about the notifications mailing list