Hello I am a newbie
I am trying to get ampy to work with a feather huzzah. The serial connection is working(Putty terminal connects). I installed rshell as well but that did not work either. Any suggestions on where I am going wrong or another suitable path? You help is greatly appreciated.
Window 7
Python 2.7.12
feather Huzzah esp3286
C:\Python27>pip install adafruit-ampy
Collecting adafruit-ampy
Using cached adafruit_ampy-0.6.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyserial in c:\python2
7\lib\site-packages (from adafruit-ampy)
Collecting click (from adafruit-ampy)
Using cached click-6.6-py2.py3-none-any.whl
Installing collected packages: click, adafruit-ampy
Successfully installed adafruit-ampy-0.6.2 click-6.6
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
C:\Python27>ampy --help
Usage: ampy [OPTIONS] COMMAND [ARGS]...
ampy - Adafruit MicroPython Tool
Ampy is a tool to control MicroPython boards over a serial connection.
Using ampy you can manipulate files on the board's internal filesystem
and even run scripts.
Options:
-p, --port PORT Name of serial port for connected board. Can optionally
specify with AMPY_PORT environemnt variable. [required]
-b, --baud BAUD Baud rate for the serial connection (default 115200). Can
optionally specify with AMPY_BAUD environment variable.
--version Show the version and exit.
--help Show this message and exit.
Commands:
get Retrieve a file from the board.
ls List contents of a directory on the board.
mkdir Create a directory on the board.
put Put a file on the board.
reset Perform soft reset/reboot of the board.
rm Remove a file from the board.
run Run a script and print its output.
C:\Python27>ampy --port com5 put test.py
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\ampy.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\click\core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "c:\python27\lib\site-packages\click\core.py", line 696, in main
rv = self.invoke(ctx)
File "c:\python27\lib\site-packages\click\core.py", line 1057, in invoke
Command.invoke(self, ctx)
File "c:\python27\lib\site-packages\click\core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python27\lib\site-packages\click\core.py", line 534, in invoke
return callback(*args, **kwargs)
File "c:\python27\lib\site-packages\ampy\cli.py", line 50, in cli
_board = pyboard.Pyboard(port, baudrate=baud)
File "c:\python27\lib\site-packages\ampy\pyboard.py", line 143, in __init__
raise PyboardError('failed to access ' + device)
ampy.pyboard.PyboardError: failed to access com5
C:\Python27>ampy --port com5 run test.py
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\ampy.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\click\core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "c:\python27\lib\site-packages\click\core.py", line 696, in main
rv = self.invoke(ctx)
File "c:\python27\lib\site-packages\click\core.py", line 1057, in invoke
Command.invoke(self, ctx)
File "c:\python27\lib\site-packages\click\core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python27\lib\site-packages\click\core.py", line 534, in invoke
return callback(*args, **kwargs)
File "c:\python27\lib\site-packages\ampy\cli.py", line 50, in cli
_board = pyboard.Pyboard(port, baudrate=baud)
File "c:\python27\lib\site-packages\ampy\pyboard.py", line 143, in __init__
raise PyboardError('failed to access ' + device)
ampy.pyboard.PyboardError: failed to access com5
C:\Python27>
Ampy failure
Re: Ampy failure
I think you will find that little users here use ampy tool. So perhaps it's best to ask in the adafruit community?
Re: Ampy failure
I use ampy all the time for my Wemos D1 Minis and Witty Cloud boards.
I am running Windows 10 with Python 3 though.
Are you disconnecting puTTY before you attempt the ampy commands? Ampy does not work if the comm port is already open.
I am running Windows 10 with Python 3 though.
Are you disconnecting puTTY before you attempt the ampy commands? Ampy does not work if the comm port is already open.
Re: Ampy failure
Did you install pyserial too?
Code: Select all
pip install pyserial
-
- Posts: 2
- Joined: Fri Nov 25, 2016 1:57 pm
Re: Ampy failure
Bitninja - I appreciate you help, I closed putty and it worked. Thanks for saving a lot of time and frustration.
Platforma - what method would you suggest for moving files instead of ampy?
Platforma - what method would you suggest for moving files instead of ampy?
Re: Ampy failure
Glad to hear you got it to work!
There's a tool made by Wendlers: https://github.com/wendlers/mpfshell
And of course Dave's rshell: https://github.com/dhylands/rshell
Probably the two popular choices at the moment.
There's a tool made by Wendlers: https://github.com/wendlers/mpfshell
And of course Dave's rshell: https://github.com/dhylands/rshell
Probably the two popular choices at the moment.