Guide by Brenton; Makerverse Micro SD Adapter - MicroPython Guide and Data Logging

I have just shared content in Guides > Raspberry Pi Pico: “Makerverse Micro SD Adapter - MicroPython Guide and Data Logging”





Read more

2 Likes

I have been trying to follow this guide using all the same components on the guide and keep receiving an OSError that there was a timeout waiting for a response. This only seems to occur when I add in a “while True:” loop. Remove the loop and the error disappears. It doesn’t even matter if the SD card is written to or not. Just mounting it will cause the error.

Do you have any ideas for troubleshooting?

2 Likes

This issue is certainly perplexing…

What happens when:

  • Lines are run one by one in the REPL?
  • A “long” (say, 1 second) time.sleep() is added on line 15?

Could you also post the whole script inside a formatted code block (started and ended with triple ` symbols)?

-Brenton

4 Likes

Hi Brenton,

I’ve been tackling your guide. However, when I try to download sdcard.py I get the error message, “Not found”.

https://raw.githubusercontent.com/micropython/micropython/master/drivers/sdcard/sdcard.py

Have you got a new link?

1 Like

Topic - Makerverse Micro SD Adapter - MicroPython Guide

Download sdcard.py Not found!

https://raw.githubusercontent.com/micropython/micropython/master/drivers/sdcard/sdcard.py

Have you a new link?

2 Likes

Hi Ken,

Thanks for letting us know about the broken link, it seems the MicoPython repo was moved.
That link should be fixed again now, you’ll just need to get a non-cached version of the project page, like the link below.

2 Likes

Hi,

Can this module be used with an ESP32 with Arduino/PlatformIO?

If so, are there any tips to which libraries to use?

Thanks

1 Like

Is it exclusively dedicated to micropython only? Or it can be used with Arduino too? Will it support the Arduino SD.h library?

1 Like

Hi Rick and @Rooppoor212784

This module just uses SPI as an interface to the SD card so it ought to work fine with other existing Arduino libraries if you didn’t want to use the micropython library we supply.

Just a note that as at 12 Feb, using v1.19unstable of the micropython installation (by Thonny) I could not get the sdcard.py file to “upload” to the pico. I could copy the file to the pico in UF2 mode, but when the script run it selected the non-uf2 mode and restarted the pico and the sdcard.py file would not appear.

I worked around this issue by have the pico in USB mode (not UF2) and creating a new file in Thonny and cut and pasting into the new file and using Thonny to save it as “sdcard.py”.

I am new at using Thonny and micropython so it might be useful info to some, or just a user error I was overcoming with this approach.

I have uploaded an Arduino C example of how to use this with the Pico (based on the same wiring as the micropython example here and using existing Arduino libraries.

2 Likes

Hi Nigel,

Thanks for sharing your code in case others want a non-micropython implementation with their Pico :slight_smile:

2 Likes

Any idea about how to solve this error? I have been stuck on this for way too long and am just running in circles. I have rewired and used different SPI buses.
image

1 Like

Hi Catie, welcome to the forum!

Could you share some more info on your setup/troubleshooting?

  1. Are you using this on a Pi Pico?
  2. Send a picture of how you have things wired, we might spot something :slight_smile:
  3. Have you tried different SD cards? How have you been formatting the cards?
  4. Did it ever work, or have you been having this issue since you started using it?
  5. Could you point us to the code you’re running, or if you wrote/remixed it yourself, attach it in between 3 backticks (```) for nice viewing on this forum.

The SD adapter doesn’t do any processing, so it’s almost a straight connection between the card and the host microcontroller, so there’s not too much that can go wrong, but we won’t rule out a hardware fault.

Keen to get to the bottom of this one with you!

1 Like