Thursday, March 26, 2020

Time Lapse Camera

I decided I needed a time lapse camera video of the bus build. I have two of the ESP32-CAM modules from AI Thinker.

To flash the ESP32-CAM I hooked a FTDI USB-serial adapter as:

5v  -> 5V  (pin 1 sorta)
GND -> GND (pin 2 sorta)
Tx  -> UOR
Rx  -> UOT
IO0 - GND during flash, press reset once first

I first tried the example in the Arduino IDE for it. It seems OK so I looked for an example time lapse. I found His code is called E8. All I changed was to un-comment the correct camera definitions.

It boots, takes a photo, writes it to the SD card and sleeps for about 15 seconds. Then repeats. Sounds just right.

I then found a micro SD card that I could reformat to FAT32.

To use it, it needs a mount. There is a mounting box at that fit fairly good. The hole for the power wires is in the wrong corner for me so I just left the cover off.

I powered it with an 18650 battery direct to the 3.3v input pin. and mounted it to the forward bulkhead of the bus. I try to remember to take out the battery when I stop working for the day and put it back in the next time.

Converting the photos to a video was trivial in linux:

  pot$ ffmpeg -pattern_type glob -i "IMG*.jpg" ~/tmp/output4.mpeg
  pot$ mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -o timelapse.avi -mf type=jpeg:fps=12 mf://@frames.txt

Here is today's video:

No comments:

Post a Comment