# Opening computer files using Raspberry Pi Piico + RFID

**URL:** <https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485>\
**Category:** Support\
**Created:** [27 October 2022 12:08 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485 "2022-10-27T12:08:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duc212954](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Duc212954](https://forum.core-electronics.com.au/u/Duc212954)\
**Post date:** [27 October 2022 12:08 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/1 "2022-10-27T12:08:21Z")

</div>

Hello!

I am completely new to using the Piico but I do have extensive knowledge on Python. I was wondering if it’s possible to keep the RPI plugged into my laptop and open video files/images with it using the RFID module?

Thanks!

---

<div class="post-metadata">

**Author:** ![Rooppoor212784](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@Rooppoor212784](https://forum.core-electronics.com.au/u/Rooppoor212784)\
**Post date:** [27 October 2022 12:51 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/2 "2022-10-27T12:51:52Z")

</div>

It should be possible. You may not find any tutorial of doing exactly the same task. Core electronics has a tutorial on Raspberry Pi Pico and RFID. You can take a look: [PiicoDev RFID Module | Guide for Raspberry Pi Pico - YouTube](https://www.youtube.com/watch?v=zv6IjnYA3YI)

---

<div class="post-metadata">

**Author:** ![Duc212954](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Duc212954](https://forum.core-electronics.com.au/u/Duc212954)\
**Post date:** [28 October 2022 08:17 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/3 "2022-10-28T08:17:22Z")

</div>

Hey,

Thanks for your reply!  
I’ve seen the tutorial before but I am stuck on how to use my RaspPi Pico to read/open files from my laptop. I also know that micropython restricts some OS modules, so what would be the best way on opening a file on my laptop? I’ve looked everywhere online and haven’t found a similar project D:

Would mean the world to me if you could help

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [28 October 2022 08:32 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/4 "2022-10-28T08:32:05Z")

</div>

Hi Duc  
I am not conversant with RPi but…

> [@Duc212954](#):
>
> how to use my RaspPi Pico to read/open files from my laptop.

> [@Duc212954](#):
>
> so what would be the best way on opening a file on my laptop?

Conflicting statements here.  
What do you want to do…  
Open laptop files on the RPi  
or  
Open RPi files on your laptop.

I can’t answer either of those questions but you might stand a better chance of answers if you can clarify what you need to do. Maybe both???

---

<div class="post-metadata">

**Author:** ![Duc212954](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Duc212954](https://forum.core-electronics.com.au/u/Duc212954)\
**Post date:** [28 October 2022 08:51 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/5 "2022-10-28T08:51:18Z")

</div>

Hi Robert,

Sorry, I should’ve made it clearer.  
My intended goal is to use the RFID module to display videos/images on my laptop, meaning when a certain tag is tapped, a video/image (from the laptop) would open. So ultimately I’m trying to open laptop files using the RPi and RFID module.

Thanks for your reply though.

---

<div class="post-metadata">

**Author:** ![Duc212954](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Duc212954](https://forum.core-electronics.com.au/u/Duc212954)\
**Post date:** [30 October 2022 11:45 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/6 "2022-10-30T11:45:46Z")

</div>

Bumping this since I still need help D:

---

<div class="post-metadata">

**Author:** ![Jeff105671](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jeff105671/32/3729_2.png) [@Jeff105671](https://forum.core-electronics.com.au/u/Jeff105671)\
**Post date:** [30 October 2022 20:36 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/7 "2022-10-30T20:36:18Z")

</div>

It’s not clear what assistance you are after. Is the Pi already communicating with the laptop over a network? In that case there is a Python library that supports what you want to do:  
[GitHub - poweradminllc/PAExec: Remote execution, like PsExec](https://github.com/poweradminllc/PAExec)  
There is at least one application built using that library that is available for free download:  
[pypsexec · PyPI](https://pypi.org/project/pypsexec/)

If the Pi is nor connected to the laptop then you would start by deciding how you want to signal from the Pi to the laptop. A wired connection would be simplest, but most laptops don’t support a simple serial port, so it would have to be via USB. A Pi can be a USB device:  
[turning-your-raspberry-pi-zero-into-a-usb-gadget.pdf (adafruit.com)](https://cdn-learn.adafruit.com/downloads/pdf/turning-your-raspberry-pi-zero-into-a-usb-gadget.pdf)

Other options include IR communication and a pair of wireless modules. It all depends on how you want to set it up and what features the laptop supports.

---

<div class="post-metadata">

**Author:** ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)\
**Post date:** [31 October 2022 02:22 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/8 "2022-10-31T02:22:53Z")

</div>

Hi Jeff, Duc,

To add to this, you may be able to ease your development by using a fully-fledged python script running on your laptop (with it’s necessary `os` modules) talking over USB serial to a Pico or, more expensively, a full-size pi.

As an aside, I have previously used PyCharm as a Pico IDE, and it doesn’t feature charts, so I sent data from my MicroPython script to a full-size python script on my laptop running `matplotlib.pyplot`.

All you should need to do is `print()` on the pico side, and PySerial `readline()` on the laptop side:

> **[Python Datalogger - Using pySerial to Read Serial Data Output from Arduino —...](https://makersportal.com/blog/2018/2/25/python-datalogger-reading-the-serial-output-from-arduino-to-analyze-data-using-pyserial)**
>
> After I became proficient with Arduino I found myself trapped in its development environment (IDE). I needed to escape from the simplicity of the serial port and transform the platform into a usable engineering tool. I tried saving to SD cards, but...

You may have to fiddle with the data to extract the number you’re after instead of control characters and the like, but it should be doable.

It’s been a while since I worked on this, but if you have trouble I should be able to dust off my old code and help out 🙂  
-James

---

<div class="post-metadata">

**Author:** ![Duc212954](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Duc212954](https://forum.core-electronics.com.au/u/Duc212954)\
**Post date:** [31 October 2022 09:35 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/9 "2022-10-31T09:35:35Z")

</div>

Hi Jeff,

The Pi is connected to my laptop via USB already, all I am needing is for the Pi to be able to run any file on my laptop when tapped with an NFC tag on it’s RFID module.

Hope that makes sense.

---

<div class="post-metadata">

**Author:** ![Jeff105671](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jeff105671/32/3729_2.png) [@Jeff105671](https://forum.core-electronics.com.au/u/Jeff105671)\
**Post date:** [31 October 2022 20:50 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/10 "2022-10-31T20:50:29Z")

</div>

> [@Duc212954](#):
>
> The Pi is connected to my laptop via USB already

Do you mean that you have enabled gadget mode and the Pi appears as a client on the local network? In that case you can use a pypsExec, as mentioned above.

---

<div class="post-metadata">

**Author:** ![Blayden](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/blayden/32/7535_2.png) [@Blayden](https://forum.core-electronics.com.au/u/Blayden)\
**Post date:** [2 November 2022 03:56 UTC](https://forum.core-electronics.com.au/t/opening-computer-files-using-raspberry-pi-piico-rfid/15485/11 "2022-11-02T03:56:55Z")

</div>

Hi Duc,

The other option you may be able to go with is using the Pi Pico as an HID device to input a hotkey and open a file. I found a video that may help you on that end:

[![](https://img.youtube.com/vi/jqCa5RZWT9s/maxresdefault.jpg "Lifesaver PANIC BUTTON !") ](https://www.youtube.com/watch?v=jqCa5RZWT9s)

As for linking it to the activation of the RFID module, I don’t know all the steps for that integration. Somebody with a bit more experience in getting the parts to talk back and forth with each other should be able to give you better advice on that. This method of interacting with the laptop is just a different way of doing things and may simplify the process a bit.

-Blayden
