Connected an SD card reader to the ESP32 and could access it via machine.SDCard(slot=2).
Tried the same with a PyBoard, but the SDCard class is not present in 'machine', although the docs (of today) advertise it. Do I need other spectacles or do I see this right?
Regards, Rob
machine.SDCard missing?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: machine.SDCard missing?
I have accessed SD cards from the days of the Pyboard 1.0 using this official driver.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: machine.SDCard missing?
Thanks Peter, I have used that driver too, but it fails with SD-cards of 2GB (well in fact the os.mount() fails). I tried to find the cause but fruitless so far.
Just by coincidence I found today in the online MP libraries doc the SDCard class in 'machine'. I tried it with an ESP32 and it appeared to work fine with a 2GB SD card! Reason enough to try it immediately with a PyBoard.
With respect to the PyBoard the SDClass documentation mentions only:
Regards, Rob
Just by coincidence I found today in the online MP libraries doc the SDCard class in 'machine'. I tried it with an ESP32 and it appeared to work fine with a 2GB SD card! Reason enough to try it immediately with a PyBoard.
With respect to the PyBoard the SDClass documentation mentions only:
which sounds to me that the SDCard class is also present in the machine library of the PyBoard.The standard PyBoard has just one slot. No arguments are necessary or supported.
Regards, Rob
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: machine.SDCard missing?
I agree there is a conflict between the docs and the firmware. However even if the firmware matched the docs I can't see it would help you. The statement
Unless I'm missing something there is no choice than to use the official driver, despite its limitations.
implies that you couldn't declare a second adaptor.The standard PyBoard has just one slot. No arguments are necessary or supported.
Unless I'm missing something there is no choice than to use the official driver, despite its limitations.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: machine.SDCard missing?
OK! It seems that I'll have to accept the limited implementation of the machine.SDCard class for PyBoard compared to that of the ESP32 port. Hopefully this is temporary.