lemariva / uPyCam

Take a photo with an ESP32-CAM running MicroPython
https://lemariva.com/blog/2019/09/micropython-how-about-taking-photo-esp32
Apache License 2.0
140 stars 42 forks source link

timelapse camera fails writing to the sdcard on a ESP-CAM with MicroPython v1.13-4-g3ff707927 #11

Closed aguaviva closed 3 years ago

aguaviva commented 3 years ago

timelapse camera fails writing to the sdcard on a ESP-CAM with MicroPython v1.13-4-g3ff707927-dirty on 2020-09-06; ESP32 CAM with ESP32.

It turns out that with this firmware you need to mount the sd card like this

import machine, uos
uos.mount(machine.SDCard(slot=2, width=1, sck=14, mosi=15, miso=2,  cs=13), "/sd")

Same thing for a TTGO T8 v1.7 See https://github.com/micropython/micropython/issues/4722#issuecomment-627641988 for more details.

lemariva commented 3 years ago

Thanks for the tip. Solved with commit: de1351a5591c31107e9a3f5ebe80a3bc56dec14e I've chosen slot=3 because slot 2 is used with the camera.