Page 1 of 1

how to read/write files without ampy

Posted: Wed Jul 29, 2020 6:50 pm
by kbb732
hallo
i'm new in micropython but, i can program in python
i want to put files into fs esp32 but only i see the tool ampy
but... this not run for me
there's another tool for this??

thank you.

Re: how to read/write files without ampy

Posted: Wed Jul 29, 2020 6:59 pm
by Roberthh
You can use pyboard.py from this place: https://github.com/micropython/micropyt ... ster/tools
or rshell: https://github.com/dhylands/rshell
or any of the IDE's that exists, like thonny, if you search in the forum for IDE.

Re: how to read/write files without ampy

Posted: Wed Jul 29, 2020 8:02 pm
by kbb732
ok, thank you i will prove rshell, pyboard no run in my pc.

Re: how to read/write files without ampy

Posted: Wed Jul 29, 2020 8:19 pm
by Roberthh
pyboard.py is a pure python script. It should run with python3. What's the error message?
Edit: You migth have to install pyserial:

pip install pyserial

Re: how to read/write files without ampy

Posted: Wed Jul 29, 2020 8:55 pm
by kbb732
Gaming-3:~/Descargas/micropython-1.12/tools$ python3 pyboard.py --device /dev/ttyUSB0 ls
^CTraceback (most recent call last):
File "pyboard.py", line 600, in <module>
main()
File "pyboard.py", line 540, in main
pyb.enter_raw_repl()
File "pyboard.py", line 299, in enter_raw_repl
data = self.read_until(1, b'raw REPL; CTRL-B to exit\r\n>')
File "pyboard.py", line 275, in read_until
new_data = self.serial.read(1)
File "/home/adrian/.local/lib/python3.6/site-packages/serial/serialposix.py", line 483, in read
ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())


don't show me the directories, reject any command and timeout

i did prove thonny and connect to the esp32, i can get files from esp32 but... i dont understand how to upload

Re: how to read/write files without ampy

Posted: Thu Jul 30, 2020 12:01 am
by jimmo
Just to be sure -- if you run

Code: Select all

miniterm.py /dev/ttyUSB0 115200
(which you should have if you've installed pyserial)

then you're able to connect to the REPL?

Re: how to read/write files without ampy

Posted: Thu Jul 30, 2020 5:33 am
by Roberthh
Does it worl if ouy run pyboard.py or minnterm as sudo? If yes, you have to set the access rights. What is the result of:

ls -l /dev/ttyUSB0

and which Linux version are you using?

Re: how to read/write files without ampy

Posted: Thu Jul 30, 2020 4:47 pm
by dcarson1661
Check out uPyCraft! There is a nice tutorial you can find here: https://randomnerdtutorials.com/install ... tructions/