Hello, Is there a way for CircuitPython running on the Macropad RP2040 to read a file (status.json) thats on my PC C Drive over USB? I’m new to all this and have been googling for a couple of days to no avail. Writing the file directly to Macropad works but causes the Macropad to reboot. The game file status.json is overwritten in the game many time a minute making this unworkable.
Thanks
Macropad RP2040 read json file on PC drive
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- europasteve
- Posts: 12
- Joined: Mon Nov 07, 2011 8:38 am
- dastels
- Posts: 15655
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Macropad RP2040 read json file on PC drive
I'm not aware of any way you could read a file on the PC over USB.
The best/only approach is to have the file on the MacroPad. You can disable the auto-reload when files change. See https://learn.adafruit.com/welcome-to-c ... ly-3108374.
Dave
The best/only approach is to have the file on the MacroPad. You can disable the auto-reload when files change. See https://learn.adafruit.com/welcome-to-c ... ly-3108374.
Dave
- danhalbert
- Posts: 4649
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Macropad RP2040 read json file on PC drive
If the file is rewritten many times a minute you may eventually wear out the flash. Consider sending the data over USB serial to the MacroPad instead of writing a file: https://learn.adafruit.com/customizing- ... ta-3096590. You will write the data to COM<something> on Windows. You could write a Python script that runs on the host computer to do that.
- europasteve
- Posts: 12
- Joined: Mon Nov 07, 2011 8:38 am
Re: Macropad RP2040 read json file on PC drive
I'll start looking into sending the data over USB serial. Thanks for the help.
Please be positive and constructive with your questions and comments.