Lopy sd card
-
@bessonf
you must upgrade your board firmware
current version is
release='1.6.9.b1'
https://www.pycom.io/resources/you have really old one :release='1.0.0.b1
-
@livius
It works thank you very much. I work on the LoPy for 2 weeks and I completely missed this ... -
Hi @livius said in Lopy sd card:
You must mout your SD card in boot.py
you mean that we put in boot.py this:from machine import SD import os sd = SD() os.mount(sd, '/sd')and in the main.py we put the rest ?
because i try it but it does not work i get an OSError in :f = open('/sd/test.csv', 'a')my main.py is in /flash and i have a csv file in /sd that I want to fill it every time.
thanks
-
@assia
Which error do you get?
And what you get after:os.listdir('/sd') -
-
@assia
What's the storage size of the SD card?Larger cards tend to be pre-formatted as exFAT which is not enabled in the default Micropython configuration (as Microsoft demands a patent license)
-
Hi @jmarcelino the storage size is 2 Go and i had formatted it as FAT32.
I have already managed to write in this card by executing the commands directly into the pycom console in pymakr but now as I want to execute it in main.py I do not succeed.
thanks -
-
@jmarcelino
I put the code in main.py :from machine import SD import os sd = SD() os.mount(sd, '/sd') f = open('/sd/test.csv', 'a')it worked but just the first time also in REPL and when I restart my lopy I get:
OSError in os.mount(sd, '/sd') like:
OSError: the requested operation is not possibleI suppose that the SDcard remains mounted and we can not mount it a second time in this case we must check if it is already mounted and then writing on it
-
This post is deleted!
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