added in micropython external library for const feature.
it's returing valid attribute arrays, that just need converted on z2m side. it's also respecting the stop command from the console, which I will attempt to expose as just a button press.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
21
venv/Lib/site-packages/adafruit_ampy-1.0.7.dist-info/LICENSE
Normal file
21
venv/Lib/site-packages/adafruit_ampy-1.0.7.dist-info/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Adafruit Industries
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
147
venv/Lib/site-packages/adafruit_ampy-1.0.7.dist-info/METADATA
Normal file
147
venv/Lib/site-packages/adafruit_ampy-1.0.7.dist-info/METADATA
Normal file
@@ -0,0 +1,147 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: adafruit-ampy
|
||||
Version: 1.0.7
|
||||
Summary: ampy (Adafruit MicroPython tool) is a command line tool to interact with a CircuitPython or MicroPython board over a serial connection.
|
||||
Home-page: https://github.com/adafruit/ampy
|
||||
Author: Adafruit Industries
|
||||
Author-email: circuitpython@adafruit.com
|
||||
License: MIT
|
||||
Keywords: adafruit ampy hardware micropython circuitpython
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.6
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Description-Content-Type: text/markdown
|
||||
Requires-Dist: click
|
||||
Requires-Dist: pyserial
|
||||
Requires-Dist: python-dotenv
|
||||
|
||||
# ampy
|
||||
Adafruit MicroPython Tool (ampy) - Utility to interact with a CircuitPython or MicroPython board over a serial connection.
|
||||
|
||||
Ampy is meant to be a simple command line tool to manipulate files and run code on a CircuitPython or
|
||||
MicroPython board over its serial connection.
|
||||
With ampy you can send files from your computer to the
|
||||
board's file system, download files from a board to your computer, and even send a Python script
|
||||
to a board to be executed.
|
||||
|
||||
Note that ampy by design is meant to be simple and does not support advanced interaction like a shell
|
||||
or terminal to send input to a board. Check out other MicroPython tools
|
||||
like [rshell](https://github.com/dhylands/rshell)
|
||||
or [mpfshell](https://github.com/wendlers/mpfshell) for more advanced interaction with boards.
|
||||
|
||||
## Installation
|
||||
|
||||
You can use ampy with either Python 2.7.x or 3.x and can install it easily from
|
||||
Python's package index. On MacOS or Linux, in a terminal run the following command (assuming
|
||||
Python 3):
|
||||
|
||||
pip3 install --user adafruit-ampy
|
||||
|
||||
On Windows, do:
|
||||
|
||||
pip install adafruit-ampy
|
||||
|
||||
Note on some Linux and Mac OSX systems you might need to run as root with sudo:
|
||||
|
||||
sudo pip3 install adafruit-ampy
|
||||
|
||||
If you don't have Python 3 then try using Python 2 with:
|
||||
|
||||
pip install adafruit-ampy
|
||||
|
||||
Once installed verify you can run the ampy program and get help output:
|
||||
|
||||
ampy --help
|
||||
|
||||
You should see usage information displayed like below:
|
||||
|
||||
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. [required]
|
||||
-b, --baud BAUD Baud rate for the serial connection. (default 115200)
|
||||
--help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
get Retrieve a file from the board.
|
||||
ls List contents of a directory on the board.
|
||||
put Put a file on the board.
|
||||
rm Remove a file from the board.
|
||||
run Run a script and print its output.
|
||||
|
||||
If you'd like to install from the Github source then use the standard Python
|
||||
setup.py install (or develop mode):
|
||||
|
||||
python3 setup.py install
|
||||
|
||||
Note to run the unit tests on Python 2 you must install the mock library:
|
||||
|
||||
pip install mock
|
||||
|
||||
## Usage
|
||||
|
||||
Ampy is made to talk to a CircuitPython MicroPython board over its serial connection. You will
|
||||
need your board connected and any drivers to access it serial port installed.
|
||||
Then for example to list the files on the board run a command like:
|
||||
|
||||
ampy --port /dev/tty.SLAB_USBtoUART ls
|
||||
|
||||
You should see a list of files on the board's root directory printed to the
|
||||
terminal. Note that you'll need to change the port parameter to the name or path
|
||||
to the serial port that the MicroPython board is connected to.
|
||||
|
||||
Other commands are available, run ampy with --help to see more information:
|
||||
|
||||
ampy --help
|
||||
|
||||
Each subcommand has its own help, for example to see help for the ls command run (note you
|
||||
unfortunately must have a board connected and serial port specified):
|
||||
|
||||
ampy --port /dev/tty.SLAB_USBtoUART ls --help
|
||||
|
||||
## Configuration
|
||||
|
||||
For convenience you can set an `AMPY_PORT` environment variable which will be used
|
||||
if the port parameter is not specified. For example on Linux or OSX:
|
||||
|
||||
export AMPY_PORT=/dev/tty.SLAB_USBtoUART
|
||||
ampy ls
|
||||
|
||||
Or on Windows (untested) try the SET command:
|
||||
|
||||
set AMPY_PORT=COM4
|
||||
ampy ls
|
||||
|
||||
Similarly, you can set `AMPY_BAUD` and `AMPY_DELAY` to control your baud rate and
|
||||
the delay before entering RAW MODE.
|
||||
|
||||
To set these variables automatically each time you run `ampy`, copy them into a
|
||||
file named `.ampy`:
|
||||
|
||||
```sh
|
||||
# Example .ampy file
|
||||
# Please fill in your own port, baud rate, and delay
|
||||
AMPY_PORT=/dev/cu.wchusbserial1410
|
||||
AMPY_BAUD=115200
|
||||
# Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there:
|
||||
AMPY_DELAY=0.5
|
||||
```
|
||||
|
||||
You can put the `.ampy` file in your working directory, one of its parents, or in
|
||||
your home directory.
|
||||
|
||||
|
||||
17
venv/Lib/site-packages/adafruit_ampy-1.0.7.dist-info/RECORD
Normal file
17
venv/Lib/site-packages/adafruit_ampy-1.0.7.dist-info/RECORD
Normal file
@@ -0,0 +1,17 @@
|
||||
../../Scripts/ampy.exe,sha256=yI_2sYdJofDJzqEtwYkOlJKoAQx3PLh9D0cKncTdOF4,106360
|
||||
adafruit_ampy-1.0.7.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
adafruit_ampy-1.0.7.dist-info/LICENSE,sha256=9gQ2ZE4GYwHUwujx8GdKFXsfYOT9VYZxe5nd4lXMGM0,1076
|
||||
adafruit_ampy-1.0.7.dist-info/METADATA,sha256=J30k_3TI3-vG8GSll8IWg3yBpCFMuCIr0tvNswYxTf0,5087
|
||||
adafruit_ampy-1.0.7.dist-info/RECORD,,
|
||||
adafruit_ampy-1.0.7.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
adafruit_ampy-1.0.7.dist-info/WHEEL,sha256=CihQvCnsGZQBGAHLEUMf0IdA4fRduS_NBUTMgCTtvPM,110
|
||||
adafruit_ampy-1.0.7.dist-info/entry_points.txt,sha256=zTIIUmlgcc2fs6jESYBEpIg6vF6O0rHJrTPpe0FVhdM,39
|
||||
adafruit_ampy-1.0.7.dist-info/top_level.txt,sha256=V20_LZHKhLbhLQGa8h22OpV1VD6ngxxFNEukjkCBn2c,5
|
||||
ampy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
ampy/__pycache__/__init__.cpython-39.pyc,,
|
||||
ampy/__pycache__/cli.cpython-39.pyc,,
|
||||
ampy/__pycache__/files.cpython-39.pyc,,
|
||||
ampy/__pycache__/pyboard.cpython-39.pyc,,
|
||||
ampy/cli.py,sha256=SVOtiASrbDeanLyU86kKSwqZ1gPX_-P4w6eOh3TJW_8,14955
|
||||
ampy/files.py,sha256=swfqotremCZLeuT_sGqRdJXowB-PHvBou_Ic6JtUn3o,13160
|
||||
ampy/pyboard.py,sha256=JmwUfwKMKgnWzn-CNOtb-v0ZQJM5YyHaZHlVebQnBHY,11914
|
||||
@@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.32.2)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[console_scripts]
|
||||
ampy = ampy.cli:cli
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ampy
|
||||
Reference in New Issue
Block a user