Hello,
Has any one been able to download a *.txt file from uPyCraft to an esp32?
Are there other means to do this?
It appears uPyCraft will only download a *.py fiile.
Note, I could have the main.py file create this file on the ESP32 to store persistent data
between deepsleep wake-ups but creating this file in advance simplifies my design.
Thanks,
Scott
Hi.
You can use ampy.
Take a look at this tutorial: https://techtutorialsx.com/2017/06/04/esp32-esp8266-micropython-uploading-files-to-the-file-system/
I think this is what you are looking for.
Regards,
Sara
Thanks Sara,
That is what I’m looking for.
Yesterday I can up with a hack to have a non-python file on the ESP32.
- Create an empty python file. For example ‘Foo.py’
- Download Foo.py to the ESP32 with uPyCraft
- Run “import os”
- Run os.name(‘Foo.py’, ‘Foo.txt’)
- f = open(‘Foo.txt’)
- f.write(‘somedata’)
- f.close()
I tested this procedure and it works.
Thanks,
Scott