Error instantiating the SD module.
-
This morning I started up a sample program I was attempting to write to log serial data to an SD Card, connected to an expansion board 3. I didn't get very far before this:
# main.py -- put your code here! from machine import UART from machine import SD import time import pycom import os sd = SD()Gives me the error:
Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms WiFi connection established Pybytes connected successfully (using the built-in pybytes library) Pybytes configuration read from /flash/pybytes_config.json Traceback (most recent call last): File "main.py", line 10, in <module> OSError: the requested operation failed Pycom MicroPython 1.20.2.rc6 [v1.11-01f49f7] on 2020-02-28; GPy with ESP32A version of this code was at least running without error yesterday, (even though it was not writing any data to the SD Card. This morning, I start the same code I was running and I get the above error message. That makes no sense to me.
-
Could there be something happening in your boot.py file that impacts the code in your main? Maybe doing the same operation?
-
@railmonitor Nothing changed though in my boot.py (which is empty) from one day to the next. However, I believe the internal machinations of the UART and the SD card modules are somehow stepping on each other's proverbial toes.
I have sense gotten my experiment to work again, but I have no idea why it is working now and why it gave me those messages the other day.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login