summaryrefslogtreecommitdiff
path: root/esp/src/bh1750.cpp
diff options
context:
space:
mode:
authorGustavoeklund01 <eklundgu@gmail.com>2025-10-27 20:28:29 -0300
committerGustavoeklund01 <eklundgu@gmail.com>2025-10-27 20:28:29 -0300
commit7ccab61c22fafb3bb9fa5470ff8cb46217111fe4 (patch)
tree65a629f9f99277358e3aefc19fc43a057e079dc2 /esp/src/bh1750.cpp
parentbe7952f3585fe895a3309a19e14cd93f89c3ce1b (diff)
outros códigos
Diffstat (limited to 'esp/src/bh1750.cpp')
-rw-r--r--esp/src/bh1750.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/esp/src/bh1750.cpp b/esp/src/bh1750.cpp
index e69de29..196705c 100644
--- a/esp/src/bh1750.cpp
+++ b/esp/src/bh1750.cpp
@@ -0,0 +1,13 @@
+#include <Wire.h>
+#include <BH1750.h>
+#include "bh1750.h"
+
+BH1750 lightMeter;
+
+void setupBH1750() {
+ lightMeter.begin();
+}
+
+float lerBH1750() {
+ return lightMeter.readLightLevel();
+}