I want to use the ampy tool to write a script to the OPenMV Camera board’s filesystem, to save it in the main.py so that the script runs when the board is powered on. I have installed ampy tool and tested it, its working well. However, when testing reading from and writing to the board, it throws an error. I am working on Ubuntu 20.04.
When I run this command,
sudo ampy --port /serial/dev/ttyACM0 get boot.py
I will get the following error
Traceback (most recent call last):
File “/usr/local/bin/ampy”, line 8, in
sys.exit(cli())
File “/usr/lib/python3/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1134, in invoke
Command.invoke(self, ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/ampy/cli.py”, line 99, in cli
_board = pyboard.Pyboard(port, baudrate=baud, rawdelay=delay)
File “/usr/local/lib/python3.8/dist-packages/ampy/pyboard.py”, line 147, in init
raise PyboardError('failed to access ’ + device)
ampy.pyboard.PyboardError: failed to access /serial/dev/ttyACM0
I maybe doing something obviously wrong since I am new to Ubuntu, I will appreciate any help on how to get this working. I simply just want to be able to read from and write to the board using the ampy tool.