Attempting to use a C4001 (SEN0610) for human presence detection.
Can't seem to get any sort of reliable output no matter what settings I'm using.
Serial output is never finding a person present.
Output LED is lighting up all over the place.
So somehow it appears that the module is detecting presence and lighting the output light, but radar.motionDetection() is always returning 0.
Ideas?
Code:
#include "DFRobot_C4001.h"
DFRobot_C4001_I2C radar(&Wire, 0x2A);
#define MIN_RANGE 30
#define MAX_RANGE 300
#define TRIG_SENS 7
#define KEEP_SENS 8
#define TRIG_DELAY 100
#define KEEP_DELAY 4
const bool USE_FRETTING = true; // micro-motion detection
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while (!Serial)
;
while (!radar.begin()) {
Serial.println("No DFRobot C4001 device found!");
delay(1000);
}
Serial.println("C4001 Sensor connected!");
// Set sensor mode (eExitMode is commonly used for presence/motion tracking)
radar.setSensorMode(eExitMode);
//…