Raspberry Pi Pico (RP2040) SD Card (Read & Write) with MicroPython and C/C++ | Digi-Key Electronics

  Рет қаралды 30,243

DigiKey

DigiKey

Күн бұрын

SD cards are popular ways to store data that can be transferred between computers and consumer electronics (e.g. digital cameras). They can be found in the tiny microSD format and still store gigabytes of data. SD card protocol supports the faster 4-bit SD mode as well as the 1-bit SPI mode. Some microcontrollers support SD mode for faster transfers, but the SPI mode is simple and popular for low data-rate logging (e.g. sensor data and timestamps).
In this tutorial, we show you how to read and write to an SD card from a Raspberry Pi Pico using MicroPython and C/C++. We will demonstrate the simpler SPI format, as the Pico has a built-in SPI peripheral.
Note that you will need to format your SD card using the FAT32 filesystem on your operating system. Here are some guides to help you do that:
Windows: helpdeskgeek.c...
Mac: havecamerawill...
Linux: linuxize.com/p...
A written tutorial along with all of the code in this video can be found here: www.digikey.co...
The sdcard.py driver for MicroPython can be found here: github.com/mic...
FATFS API documentation for interacting with files in MicroPython can be found here: docs.micropyth...
The third party library for working with SD cards in C/C++ can be found here: github.com/car...
FATFS API documentation for interacting with files in C can be found here: elm-chan.org/fs...
Product Links:
www.digikey.co...
www.digikey.co...
Related Videos:
Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 1: Blink - • Intro to Raspberry Pi ...
Intro to Raspberry Pi Pico and RP2040 - C/C++ Part 1: VS Code and Blink - • Intro to Raspberry Pi ...
Intro to Raspberry Pi Pico and RP2040 - C/C++ Part 2: Debug with Picoprobe - • Intro to Raspberry Pi ...
Related Project Links:
www.digikey.co...
www.digikey.co...
www.digikey.co...
Maker.io - www.digikey.co...
Digi-Key’s Blog - TheCircuit www.digikey.co...
Connect with Digi-Key on Facebook / digikey.electronics
And follow us on Twitter / digikey

Пікірлер: 18
@peterbelanger4094
@peterbelanger4094 Жыл бұрын
This tutorial is broken. The Micropython github page has changed, the sdcard lib is not at the link provided.🙁
@NokiAll2
@NokiAll2 Жыл бұрын
i tested this with raspberry pi pico(c++ sdk) and it's doesnt work
@nicolesanchez3753
@nicolesanchez3753 Жыл бұрын
Hi really thank you, i was wondering if with a MicroSD card catalex, can it be use that github in C?
@daedalus5483
@daedalus5483 Жыл бұрын
Is it possible to have data from inputs / sensors be written to the pico so that they show up in the usb drive where one uploads the code?
@petey8155
@petey8155 2 жыл бұрын
5:22 the baud rate defined here is overridden by what is entered in the sdcard.py driver - just an fyi since it took me a few minutes to figure out why the speed wasn't changing :)
@yogimarkmac
@yogimarkmac 2 жыл бұрын
I love this series!
@mytechnotalent
@mytechnotalent 3 жыл бұрын
OSErrorL [Error 19] ENODEV Not sure why it is not recognizing.
@CornelisVermazen
@CornelisVermazen 3 жыл бұрын
Thanks for the very good overview and example.
@bhimbdrlama
@bhimbdrlama Жыл бұрын
is there a way to data log in the circuit python ?
@achalasamapriya2701
@achalasamapriya2701 3 жыл бұрын
nice work and nice look as always.
@alfonsosamuel2273
@alfonsosamuel2273 3 жыл бұрын
thank you for sharing your knowledge! anyway, could you try do your spi video with ad 343 sensor but with pio spi? i think that's interesting. thank you :)
@jose1kira
@jose1kira 2 жыл бұрын
Thanks a lot! Very usefull
@rahulm4182
@rahulm4182 2 жыл бұрын
getting an error message f_prinf failed and single block write failed
@yxhankun
@yxhankun 2 жыл бұрын
Error: importerror no module named pyb at 4.51. This is a fake sketch, there is no # at the comment "Example"...at line 8 and line 15.
@louigi6001
@louigi6001 2 жыл бұрын
Hi, On digikey I can't seem to be able to leave a comment so I will leave one here. Since you wrote the article the no-OS-FatFS-SD-SPI-RPi-Pico may have changed a bit ... I was unable to compile the code you shower with the current code. Also the default pins on the pproject may have changed and don't match the wiring you are suggesting. I added hw_conf.c in the add_executable line in CMakeLists.txt add_executable(${NAME} ${NAME}.c hw_config.c) It now builds but I've not yet tested if it actually works
@gabrielfienco2531
@gabrielfienco2531 Жыл бұрын
Did you find a solution?, thanks
Я сделала самое маленькое в мире мороженое!
00:43
Кушать Хочу
Рет қаралды 4,5 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 113 МЛН
Raspberry Pi Pico - PIO explained
50:01
Slador
Рет қаралды 31 М.
Raspberry Pi Pico PIO - PIO Interrupts using C - Ep. 19
27:15
Life with David
Рет қаралды 7 М.
Pi Pico + KMK = the perfect combo for Custom Keyboards
7:41
Jan Lunge
Рет қаралды 77 М.
The Petabyte Pi Project
22:27
Jeff Geerling
Рет қаралды 2,2 МЛН
Beginners Guide to I2C on the Raspberry Pi Pico (BNO055 IMU Example)
16:57
Learn Embedded Systems
Рет қаралды 76 М.
Write Your Own Emulator for Your Own CPU - Using a Raspberry Pi Pico
32:17