The Raspberry Pi Pico File Management System - (Ep. 0.1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 มิ.ย. 2024
  • The new Raspberry Pi Pico is not just a nifty little microcontroller, It can support a real file management system. This can be useful for data storage of all kinds including data logging. Join David as he examines the file system capabilities of the Raspberry Pi Pico.
    00:00 - Introduction
    01:00 - Pico Introduction
    01:25 - Little FS Overview
    02:45 - Loading MicroPython into Pico
    03:24 - Thonny
    03:51 - The OS Library
    04:57 - Make Directory
    05:16 - Change Directory
    05:44 - Get Current Working Directory
    06:23 - List Directory
    06:45 - Remove Directory
    07:46 - Iterator List Directory
    08:39 - Status
    09:16 - Status of the Virtual File System
    10:05 - Uname
    10:27 - Remove File
    11:00 - Rename File or Directory
    11:29 - VfsLfs2, mount, umount
    12:10 - Writing and Reading Files
    14:10 - Closing
    Getting Started with the Raspberry Pi Pico:
    • Raspberry Pi Pico - Co...
    littlefs design document:
    github.com/littlefs-project/l...
    MicroPython UF2 file:
    www.raspberrypi.org/documenta...
    Thonny IDE:
    thonny.org/
    Music:
    (Pinnacle 19.5 royalty-free music):
    Pulsing Dance
    House Fever
    Reaction Time
    City Night Groove
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 57

  • @jbrubaker9399
    @jbrubaker9399 ปีที่แล้ว

    Thanks for this video. This is the only Pico video I've watched that explains the file system. You are also the only one who has a 'baked beans' video in the same channel :)

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว

      Not to mention potato salad! Thanks for watching!

  • @someoneelse3740
    @someoneelse3740 2 ปีที่แล้ว +2

    Great information video. Straight forward to what we need to know Thanks a lot keep up the awesome work

    • @LifewithDavid1
      @LifewithDavid1  2 ปีที่แล้ว

      Thank you. Hopefully, you'll like the other videos in my series about the Pico.

  • @downinthedungeon
    @downinthedungeon 2 ปีที่แล้ว +1

    Thank you Mr David sir, this answered a boat-load of questions. What a great video! *bookmarked, liked, subscribed* de newbie

  • @NickT6630
    @NickT6630 3 ปีที่แล้ว +4

    Wow this is seriously cool!! Thanks for making the video! 🙂 I have an SC126 Z180 (RC2014 compatible) computer I built and I added a Pico to it. I want to do similar things with file storage and reading and writing code to run on it.

  • @andyonions7864
    @andyonions7864 2 ปีที่แล้ว

    Nice. I was in Thonny anticipating your commands just a little ahead except where micropython diverged from linux (os.listdir()) and c (f.read()). Great stuff.

    • @LifewithDavid1
      @LifewithDavid1  2 ปีที่แล้ว

      Thank you! Glad it was interesting!

  • @mysketchbook9630
    @mysketchbook9630 3 ปีที่แล้ว +1

    Thank you David

  • @mondogeo7890
    @mondogeo7890 3 ปีที่แล้ว

    Very useful. Thanks

  • @BigB59
    @BigB59 ปีที่แล้ว

    Отличное видео!

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว +1

      Спасибо вам большое

  • @twisternine
    @twisternine ปีที่แล้ว

    Amazing video, I'm looking forward to watch all yours raspberry pico videos 👏👏👏
    I have a data collection trough sensors going on (technical school project) and this will help me a lot to store the data to send to cloud via esp-01 after the collection

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว +1

      That’s great! I’ve been trying to get a RasPi Pico W to play with; but I’m not having much luck (I’m not Jeff Geerling). That would let you do it all in one package. Thanks for watching!

    • @twisternine
      @twisternine ปีที่แล้ว

      @@LifewithDavid1 yeah, a pico W would be a lot easier to handle
      But i didn't had luck finding one too (I'm from Brazil)
      I will definitely look for it later for my own projects

  • @GeorgeFoot
    @GeorgeFoot 3 ปีที่แล้ว +8

    Looking forward to seeing what you come up with! Watch out for the voltage though, the Pico is 3.3V and needs level shifting if your 6502 is at 5V

    • @LifewithDavid1
      @LifewithDavid1  3 ปีที่แล้ว +5

      You're absolutely right. I've got a bunch of 4 channel bi-directional logic level shifters that I will be playing with. Luckily, if I mess up, I'll burn up the $4 Pico instead of my vintage 6502.

    • @LeifBloomquist
      @LeifBloomquist 2 ปีที่แล้ว

      @@LifewithDavid1 I found this video while looking for a solution to this exact question about level shifting! Did you ever test the Pico with your 6502?

    • @LifewithDavid1
      @LifewithDavid1  2 ปีที่แล้ว +2

      @@LeifBloomquist Yes, I did two videos, th-cam.com/video/IezixdfznS0/w-d-xo.html and
      th-cam.com/video/dGNJGC_wZtk/w-d-xo.html. The first one uses bit banging, and the second uses PIO. It worked well!

  • @Jake-ms9dr
    @Jake-ms9dr ปีที่แล้ว

    Thank you!!

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว +1

      You're welcome! Thanks for watching!

  • @davidminderman3179
    @davidminderman3179 3 ปีที่แล้ว +1

    That would be good for a remote data logger!

  • @onjofilms
    @onjofilms ปีที่แล้ว

    Good stuff. Just like my tape drive for my Vic-20 some 40 yrs ago.

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว

      Those were the days...thanks for watching!

  • @jyvben1520
    @jyvben1520 3 ปีที่แล้ว +1

    nice, learned some things, subscribed, the pico probably has a lot more processing power than the 6502,
    expect old school uart to be the simplest solution for integration,
    using ram for volatile data and file storage for non volatile. maybe ustruct could help.
    if the pico could control sdcard device, gigabytes

    • @LifewithDavid1
      @LifewithDavid1  3 ปีที่แล้ว

      Thank you. Good info; I'm starting to look at my options now. I'll see how ustruct can help . 1.4 MB is great plenty space for a 6502; at least to start with. The RP2040 can control up to 12 MB of external flash storage. I expect that other boards will be coming soon.

  • @Videogame9559
    @Videogame9559 3 ปีที่แล้ว

    Hi David could you help me out l keep getting no module neopixel found or no board found as an import command?
    What do l need to add
    I am trying to run neopixel.py rainbow.py programme that runs a strip a long neopixel that goes though all the colours circles like flashing .

    • @LifewithDavid1
      @LifewithDavid1  3 ปีที่แล้ว

      I'm not really sure; since I've not run NeoPixel. I will say that I found it is important to import the proper libraries, in your case: machine and neopixel. I found some info on neopixel and MicroPython here: docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html

  • @bennydmduiken
    @bennydmduiken ปีที่แล้ว +1

    Can you explain the need and or advantages for creating a "/lib"-directory in RP-Pico?

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว

      I haven't done a lot of research on this, but MicroPython pulls in various programs as needed. I imagine /lib would be the default place for those programs to reside; similar to Linux. I'm not sure if they can live elsewhere. Just a guess. Thanks for watching!

  • @gabrielfienco2531
    @gabrielfienco2531 ปีที่แล้ว

    Do you think we could use it to mount a SDcard of 16GB so we can transfer via USB files directly to the sdcard with littlefs ??? I am looking for info aboutit , just asking for your opinion, big fan of your videos.

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว

      Maybe; but I'll bet each file would be limited in size to the available memory of the Pico. I know there is an SD card adapter in the Raspberry Pi Pico Hardware design data sheet. Good luck!

    • @gabrielfienco2531
      @gabrielfienco2531 ปีที่แล้ว

      @@LifewithDavid1 Yes, I had some kind of issue with RAM using rp2040 device mass storage with tinyusb, I am just trying to find another way to do it. thanks again

    • @J.D-g8.1
      @J.D-g8.1 ปีที่แล้ว +1

      Littlefs in itself isnt constrained by the amount of ram i believe.
      And it would be really strange i the chip ram should dictate the size of the ad card.
      Ofcourse, each single file are constrained by RAM, and depending on how you implement a logger, that can be a problem.
      But is suggest using littlefs and FAT file structure, and splitting the log file into many files, each could be either a couple of sectors, or 1 day old, etc.
      I havent tried this myself yet, (with littlefs) so just thinking loud here.

  • @yigitatalan515
    @yigitatalan515 3 หลายเดือนก่อน

    Hi thx for video. How can i access FS from windows file system when i plug into usb

    • @LifewithDavid1
      @LifewithDavid1  3 หลายเดือนก่อน

      As far as I know, you have to let Little FS do it's thing through a MicroPython IDE like Thonny.

    • @yigitatalan515
      @yigitatalan515 3 หลายเดือนก่อน

      how can i do it without any 3rd party program, just using windows file system @@LifewithDavid1

    • @LifewithDavid1
      @LifewithDavid1  3 หลายเดือนก่อน

      Unfortunately, I don't think you can, easily. The flash is only accessible through the USB port; but is not natively compatible with other flash drive "formats". You might be able to cobble something together using TinyUSB; but you might still have to use LittleFS. That's way beyond my capabilities.

  • @ambrose5728
    @ambrose5728 2 ปีที่แล้ว

    How could I read these text files via usb connection with a rpi 3b+?

    • @LifewithDavid1
      @LifewithDavid1  2 ปีที่แล้ว

      I think it is possible using debugging tools provided by the Raspberry Pi Foundation. I haven't implemented it yet; so unfortunately I don't have any first hand experience.

    • @JuddMan03
      @JuddMan03 ปีที่แล้ว

      3B+ is a computer so it depends on what OS you have on it. If its linux, then you would use the mount command to load a USB storage device.

  • @Eslam-Sameh
    @Eslam-Sameh 2 ปีที่แล้ว +1

    Thanks sir, If you don't mind, How old are you?

    • @LifewithDavid1
      @LifewithDavid1  2 ปีที่แล้ว

      I'm not sure why you want to know, but I have been told I look older than I am. Thanks for watching!

    • @Eslam-Sameh
      @Eslam-Sameh 2 ปีที่แล้ว +1

      @@LifewithDavid1 Sorry if i annoyed you. But really i like your videos

    • @LifewithDavid1
      @LifewithDavid1  2 ปีที่แล้ว +2

      I'm not annoyed at all; however, because of possible hacking, I keep my age and some other things private. I appreciate your comments.

    • @Eslam-Sameh
      @Eslam-Sameh 2 ปีที่แล้ว +1

      You are right.

  • @cheblack677
    @cheblack677 ปีที่แล้ว

    I got how to add dates to a file, but not how to change them.

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว

      Make sure you set the Pico clock. Then I believe that every time you modify the file, the date will be updated.

  • @edgeeffect
    @edgeeffect 3 ปีที่แล้ว

    "C, C++, Python" (shudders) ..... ASSEMBLY LANGUAGE! ;)

    • @LifewithDavid1
      @LifewithDavid1  3 ปีที่แล้ว

      Machine Language :-) Yes I'm sick...

  • @seamusdemora5598
    @seamusdemora5598 ปีที่แล้ว

    +1 : You asked for comments, so here 'tis: S--L--O--W-- You could vastly improve with some video editing. We really don't need to see you type all of those commands. Maybe pick up the pace by doing an 8X speed increase wile typing?? You can figure it out, I'm sure - but the pace should be faster.

    • @LifewithDavid1
      @LifewithDavid1  ปีที่แล้ว +1

      Thank you for your comment. I understand and agree. Although I get 10 times more comments by viewers that appreciate that I go slow enough that the concepts can sink in the first time; I have sped things up in my recent videos by not typing; but rather highlighting existing text. Hope this makes for a more enjoyable experience. Thanks for watching!