cannot import name SD
-
I try to use an SD Card with the Lopy as I used it with the Wipy, but I can't import the SD module.
I guess that it is not available for the Lopy at this time.
Am i correct ? -
-
Hello
in the meantime a new firmeware for the Lopy is available. With some code I can mount a sd card in the boot.py:
from machine import SD
sd = SD()
os.mount(sd, '/sd')Unfortunately the "connection" to the sd card gets lost after some time. If I try to mount the sd-card again the Lopy hangs up when I call the command sd = SD() on the pycom console. The access of the Lopy via ftp by means of Filezilla isn't possible any longer. Perhaps there is a conflict with my onewire Sensor on Pin G10?
from machine import Pin
from ds18x20 import DS18X20
d=DS18X20(Pin('G10', mode=Pin.OUT))After reboot I get following message:
Traceback (most recent call last):
File "<stdin>", line 20, in <module>
OSError: the requested operation failedin line 20 I call the command sd = SD()
Are there any hints whats going wrong? I already tried different SD-Cards (small old ones with 64 MB and a brandnew Class 4 8GB Sandisk). I format the SD-Cards not with Windows but with SDFormatter.
I use firmware version firmware release 1.2.0.b1 which seems to be already oldfashioned :-)
With nice regards!
-
Hello @cypereddy, I think you already found the reason for it to stop working, G10 (P23) is the clock for the SD card ;) . Here is the list of pins that are used by the SD card:
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