Generalized-Core-Counter
3.20
Particle-based generalized core counter firmware
Loading...
Searching...
No Matches
PIRSensor.cpp
Go to the documentation of this file.
1
// src/PIRSensor.cpp
2
#include "
PIRSensor.h
"
3
#include "
device_pinout.h
"
4
5
// Static ISR flag and a simple counter so we can see
6
// in the main loop whether the ISR is ever firing.
7
volatile
bool
PIRSensor::_motionDetected =
false
;
8
volatile
uint32_t PIRSensor::_isrCount = 0;
9
10
// Static ISR handler
11
void
PIRSensor::pirISR() {
12
_motionDetected =
true
;
13
_isrCount++;
14
}
PIRSensor.h
device_pinout.h
Pinout definitions for the carrier board and sensors.
src
PIRSensor.cpp
Generated by
1.15.0