From 4dbe8e9ded188ca623047d905f2cd6c567c7ea31 Mon Sep 17 00:00:00 2001 From: Tobias King Date: Fri, 11 Mar 2022 16:11:36 +0100 Subject: [PATCH] Fixed error in example code An error in the loop function led to the fact that the sensors were never queried. --- .../boards/nicla-sense-me/tutorials/cheat-sheet/cheat-sheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cheat-sheet/cheat-sheet.md b/content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cheat-sheet/cheat-sheet.md index 1c7fdd1a29..4753b40b09 100644 --- a/content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cheat-sheet/cheat-sheet.md +++ b/content/hardware/05.nicla/boards/nicla-sense-me/tutorials/cheat-sheet/cheat-sheet.md @@ -343,7 +343,7 @@ Reading the sensor values: ```cpp void loop(){ - unsigned long lastCheck= millis(); + static auto lastCheck = millis(); // Update function should be continuously polled BHY2.update();