FastLED 3.9.3
Loading...
Searching...
No Matches
pir.h
1#pragma once
2
3#include <Arduino.h>
4#include <stdint.h>
5
6#include "ui.h"
7
8class Pir {
9 public:
10 Pir(int pin) : pin(pin) { pinMode(pin, INPUT); }
11 bool detect() {
12 return digitalRead(pin) == HIGH || detectMotion.clicked();
13 }
14
15 private:
16 Button detectMotion = Button("Detect Motion");
17 int pin;
18};
Definition ui.h:70
Definition pir.h:8