summaryrefslogtreecommitdiff
path: root/esp/src/lm393.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'esp/src/lm393.cpp')
-rw-r--r--esp/src/lm393.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/esp/src/lm393.cpp b/esp/src/lm393.cpp
deleted file mode 100644
index 5eb4bdf..0000000
--- a/esp/src/lm393.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <Arduino.h>
-#include "lm393.h"
-
-#define SENSOR_PIN 32 // ou 35 se preferir
-
-void setupLM393() {
- pinMode(SENSOR_PIN, INPUT);
-}
-
-int lerLM393() {
- static int contagem = 0;
- static unsigned long lastTime = 0;
-
- if (digitalRead(SENSOR_PIN) == LOW) {
- contagem++;
- delay(10);
- }
-
- if (millis() - lastTime >= 1000) {
- int pulsos = contagem;
- contagem = 0;
- lastTime = millis();
- return pulsos;
- }
- return 0;
-}