- LAMPIR driven code, based on arduino
- Raspberry Pi code for camera, data storage
- Human detection of photos and analog data analyzing
- LAMPIR and PIR are as slaves of Raspi.
- Raspi runs Python code, with multithread to collect data (plot) and storage photos. See Python multithreading.
- Filename is the system time when starting recording.
- Picamera takes record video continously, the video files are seperated by 1 min.
- The code MUST run under raspberry PI3. PiCam must present as well as LAMPIR node.
- Final code is in
./videolog/videolog.py
or./videolog/videolog_2pir.py
(for logging data from LAMPIR and traditional PIR). - Afterrunning, the video and analog output will be stored in
videodir='/home/pi/datalog/videolog/'
,datadir='/home/pi/datalog/lampirdata/'
pirdir='/home/pi/datalog/pirdata
, with 1 min intervals.
- All analog signals are converted through an ADC on Arduino board, range from (0, 1024), indicating (0, 5 V). Raspi logs these data into a
.CSV
file, in such form:b'526\n'2018-03-08 17:57:40.330576
. - A preprocessing is required to extract such signals as well as meaningful time stamps.
- Types of data signals:
High frequency | Signal high Vpp | Single low Vpp |
---|---|---|
Moving | Stationary | Unoccupied |
- First step is seperate high and low frequency.
- Second step is classify stationay and unoccupied scenarios in low frequency signals.
copyright by Libo Wu, libo.wu@stonybrook.edu