I am confused. I started with official firmware and quickly switched to loboris firmware. I can set sd card mode (SPI) and pins at will with this:
uos.sdconfig(uos.SDMODE_SPI, clk=5, mosi=18, miso=19, cs=15)
This MUST have been loboris firmware because I couldn't find this method under uos in the official firmware.
So my question is: does the standard firmware support setting SD card pins and/or mode? If the answer is NO, that would be quite unfortunate.
I found this related information:
https://github.com/micropython/micropyt ... /sdcard.py
Documentation/instruction is non-existent.
Must I switch to loboris firmware in order to get these basic features standard?
Set sd card mode and pins in official firmware
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Set sd card mode and pins in official firmware
Unfortunately documentation for the official ESP32 port is lacking. You should use the ESP8266 docs as a guide. SPI is set up using the machine module documented here.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Set sd card mode and pins in official firmware
Thanks Peter. I decided to switch to Loboris firmware for its easy support of sd card. Long story short, I got it working after some struggle.
Regarding SPI MicroPython module, is there any way to show properties such as baud rate or whether MSB or LSB was selected? There was only an init, which is like a setter, but no getter or direct access to these properties.
Regarding SPI MicroPython module, is there any way to show properties such as baud rate or whether MSB or LSB was selected? There was only an init, which is like a setter, but no getter or direct access to these properties.