## Update Jun 30, 2020 Version 86 - some new features
<imgsrc="./v86/v86.jpg">
# Software
- redo camera scheduler to reduce frame skips with slight delays between frames
- move more processing to separate priority tasks, and remove from idle loop()
- most tasks suspened waiting for events, rather than loopong checking for events, ... except ftp which still loops wating for ftp requests
- added a sd card snapshot jpg at beginning of every movie
- added a telegram.org message with opening picture and info about diskspace and rssi to follow camera activity on your computer or phone
- added deepsleep feature to wake on PIR, and then deepsleep after movie is recorded
- added touch sensor on pin12 to enable/disable the pir sensor
- added more careful setup of difficult pins 12, 13, and 4 - used for SD and re-used for PIR, Touch, and Blinding Disk-Active Light
- added brownout handler to close files on brownout, which didn't work, but at least I can deepsleep to prevent multiple brownout reboots. (Inside a brownout handler, you have only 300ms and you cannot access wifi, sd, or flash, ... so cannot close files, or send message.)
- re-used pin 4 Blinding Disk-Active Light to blink gently at beginning of movie, and at a Touch - ironically, also turns on during Brownout ;-)
- added several functions to enable / disable pir or bot using internet
- http://desklens.local/bot_enable
- http://desklens.local/bot_disable
- http://desklens.local/pir_enable
- http://desklens.local/pir_disable
- http://desklens.local/ ... look through viewfinder and see status
- http://desklens.local/stop
- http://desklens.local/start ... with existing or default parameters
- moved many settings to a separate file "settings.h" so you edit that, rather than digging through the main file to set your wifi password, startup defaults, and enable/disable internet, pir, telegram, etc
- not super-elegant code ... still haven't written the avi writer into a nice library
- read comment on rtc_cntl.h below which may or may not be updated in the esp32 board library - links and info below
# Hardware
- to use PIR function, put an active high PIR or microwave on pin 12 with a 10k resistor (brown,black,orange) between pin 12 and PIR output to avoid antagonizing sd card
- to use Touch function, put a wire (with optional metal touch point) on pin 13 and touch it to enable/disable pir
- Blinding Disk-Active Light will give little blink during a touch, or when starting a recording
- red led on back with blink with every frame if you have that enabled in settings
## Update Feb 29, 2020 Sample Hardware for Microwave Camera
This is a bit of hardware to set up a camera recording to SD Card whenever something moves, as seen through a microwave device, and adds a led so you can see when the camera sees you!
- if you want no internet, just leave the fake ssid and password, and it will date your PIR recordings as 1970, but keep all your PIR clips timed and dated after 1970, which is better than just numbering them
- default startup is VGA, 10 fps, quailty 10, 30 minutes long, playback realtime, repeat 100 times, and it starts automatically after a reboot -- this is actually a little aggressive for my LEXAR 300x 32GB microSDHC UHS-I, which will usually keep up with 10 fps, but will sometimes start skipping
- BlinkWithWrite #define of 1 will blink the little red led with every frame, or #define 0 will just blink SOS if the camera or sd card are broken, or if you are skipping frames because sd cannot keep up
- also implemented dates and times in ftp which had been mysteriously missing. The "Date Modified" on Windows should now be the correct time the file was completed on the ESP32. The "Date Created" will be the time you ftp'ed it. And the time in the file name is the time the file was started recording on the ESP32.
- also note that the file names of the PIR files are all just "L15" (the original creation of the file), but the files themselves will be as long as the PIR had activity. I haven't updated the filename for the eventual length.
- you just need the 3 files from the /v60 folder
- I'll rewrite this intro with v60 instructions ... at some point
- put a capacitor between the +5 and Ground to prevent the frequent "brownout" problems. I saw 220 microFarad recommended somewhere, and it works good.
- keep the antenna part of the chip - the part with the squiggly line - above and away from your circuit board or any wires. The internet speed will improve dramatically with just 1 or 2 mm of extra space.
Also, other SD chips will be faster or slower. I was using a SanDisk 16GB microSDHC "Up to 653X" - which was slower and more unpredictable than the LEXAR ???
Picture below shows my solution to the "Flash" led, aka "the Blinding Disk-Active light". The led turns on whenever you are are writing data to the SD chip, which is normally after you have taken the picture, so you don't need the flash on any more!
Quick de-solder of the collector on the top of the J3Y transistor just above the led, then put in some tape to keep it clear -- you can solder it back later if you want to use it.