How to Transfer Data/Files from Raspberry Pi Pico to Local Computer (Programmatically) - Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • Learn how to write to files on your local computer so that you can save larger files using the Raspberry Pi Pico or Pico W in MicroPython. By the end of this video, you will be able to write to save data on your machine, such as sensor data, without having to use any storage on your Pico! You can also use the same method in this video to write files from Pico to a Local PC!
    This has great applications for storing large amounts of data collected by your sensors.
    Best of all? It is super simple and only requires some Python code.
    Link to Blog Post and Website
    shillehtek.com/blogs/news/how...
    Where to buy BME280
    www.amazon.com/dp/B0BQFV883T?...
    TIMESTAMPS
    00:00 Introduction
    01:05 Pip Package (Terminal)
    01:55 Local Code
    04:35 Pico Code
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @mmshilleh
    @mmshilleh  10 หลายเดือนก่อน +1

    If you enjoy such content please do not forget to like, comment, and subscribe! Would be great to support our content trying to get to 1000 subs in December :)

  • @maxbehrens8197
    @maxbehrens8197 11 หลายเดือนก่อน +1

    This was extremely helpful, Thank you

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน

      Glad you think so! Think it is a simpler alternative to MQTT if you do not want a third-party client :) Do not forget to subscribe buddy. Thanks!

  • @yiweiwu7600
    @yiweiwu7600 10 หลายเดือนก่อน +1

    It helped me a lot, thank you very much!

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      I am happy you liked it! Be sure to subscribe mate!

  • @mattkojetin8198
    @mattkojetin8198 11 หลายเดือนก่อน +1

    Thank you. Looking good.

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน

      Thank you Matt your comment means a lot!

  • @isaacreynolds9898
    @isaacreynolds9898 3 หลายเดือนก่อน +1

    got a sub from me, that worked great! thanks for the tutorial! glad to level up and unlock data logging for my accelerometersss

    • @mmshilleh
      @mmshilleh  3 หลายเดือนก่อน +1

      Thanks for the sub! I am very happy it was useful to you buddy :)

  • @wasdaletimelapse7658
    @wasdaletimelapse7658 6 หลายเดือนก่อน +1

    Hi, can i just ask what might be a stupid question but is the Pico W connected to your Mac via USB cable whilst you are transferring data over serial connection? If it is then why not use Thonny or some thing similar to transfer the data. I'm sorry but I am very new to the Pico and python and I need very basic info. Thank you in advance.

    • @mmshilleh
      @mmshilleh  6 หลายเดือนก่อน +2

      Welcome, Buddy! No question is considered stupid here - we all start as beginners, and I respect your learning journey.
      Though the connection is via USB, the basic Pico program only has access to its internal storage. The local computer filesystem isn't directly accessible. To overcome this, I opted for serial communication. While there might be cleaner alternatives, I found serial communication to be simple and convenient. I couldn't get my Macbook's filesystem to mount on the Pico, leading me to develop this solution.
      Hope you subscribe, watch other videos, and ask more questions!

  • @PatrickConstant
    @PatrickConstant 3 หลายเดือนก่อน +1

    Thanks but for me it's unusable. If you check temperature with a BMC280, it's for recording in other place than near the computer. So I will look on youtube to use le local network to transfer data. I have done it with Webserver on Pico and wget on computer (like Raspberry zero W), I would like a transfer as http, ftp or other protocoles. Thanks

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

      AWS IoT is a great way to do these things, have you ever tried it?

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

      Yes i've done. A Raspberry Pico W is checking the temperature and humidity, A Raspberry Zero 2W is sending a request by crontab; if the temperature is out of range, I send a pushbullet on my smartphone.@@mmshilleh

  • @chadmckean9026
    @chadmckean9026 8 หลายเดือนก่อน +1

    What if i do not want to save data to a file, i just want to read each line as it is received then process it (do a action then save data to a log)

    • @mmshilleh
      @mmshilleh  8 หลายเดือนก่อน

      You can easily do that if you slightly modify the code. I just showed one use case but it's possible to simply process it and do something else. I don't have an example sitting around but perhaps in a future video

    • @chadmckean9026
      @chadmckean9026 8 หลายเดือนก่อน

      @@mmshilleh would i need to loop and read the output 1 character at a time? then process it when i see a special char like a line break? maybe i should send a string length (eg 0022; should never get over 9000) and then read that many bytes?

  • @Hamza__E
    @Hamza__E 10 หลายเดือนก่อน +1

    Question:
    1) Is there a way to choose when to run the Pico code rather than having to connect it and disconnect every time?

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      You would need a more sophisticated script for that. You can record time in Python and run portions of the script at different times or chronologically. You would probably have to do something like that. High-level answer but I think it is indeed possible mate!

  • @Joe98375
    @Joe98375 7 หลายเดือนก่อน +1

    I get the error that 'Serial' module not found. How do I install this module on the pico?

    • @mmshilleh
      @mmshilleh  7 หลายเดือนก่อน

      it should be lowercase 'serial' if you are referring to the pyserial package in your local setup buddy :) Hope that helps.

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

      hi, i'm with the same problem...do you solved it?