[riot-notifications] [RIOT-OS/RIOT] drivers/lpsxxx: refactor lps331ap and add support for lps25hb + lps22hb (#10695)

MrKevinWeiss notifications at github.com
Thu Jan 3 16:03:45 CET 2019


MrKevinWeiss commented on this pull request.



> +    lpsxxx_t dev;
+
+    printf("Test application for %s pressure sensor\n\n", LPSXXX_SAUL_NAME);
+    printf("Initializing %s sensor\n", LPSXXX_SAUL_NAME);
+    if (lpsxxx_init(&dev, &lpsxxx_params[0]) != LPSXXX_OK) {
+        puts("Initialization failed");
+        return 1;
+    }
+
+    uint16_t pres;
+    int16_t temp;
+    while (1) {
+        lpsxxx_enable(&dev);
+        xtimer_sleep(1); /* wait a bit for the measurements to complete */
+
+        lpsxxx_read_temp(&dev, &temp);

Maybe it would be interesting to read/print several temperatures in a row to see if a change occurs then read the pressures.  This can expose the update problem I am thinking of.

-- 
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/10695#pullrequestreview-189045308
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190103/56d10163/attachment.html>


More information about the notifications mailing list