Skip to content
Discussion options

You must be logged in to vote

The sdcard onboard of esp32-cam (AIThinker) is wired as sdmmc device.

Using SPI to access the sdcard will not work as you mention. You have to use sd=machine.SDCard().

>>> import machine, os
>>> sd=machine.SDCard()
>>> sd.info()
(4016046080, 512)
>>> os.mount(sd, "/sd")
>>> fn = '/sd/test'
>>> f = open(fn, 'w')
>>> msg = 'hello world!'
>>> w=f.write(msg)
>>> w == len(msg)
True
>>> f.flush()
>>> f.close()
>>> f = open(fn)
>>> ms = f.read()
>>> ms == msg
True
>>> f.close()
>>> os.umount("/sd")
>>> sd.deinit()

Using an SD card with a capacity greater than 4GB will cause the system to hang.

The firmware used in the test is MicroPython v1.20.0-206-g33b403dfb compiled with idf4.4.6 which suppor…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Flipje1955
Comment options

Answer selected by Flipje1955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
2 participants