https://github.com/atron-cc/atron-cli
A tool to intract with your MicroPython board.
https://github.com/atron-cc/atron-cli
micropython
Last synced: 6 days ago
JSON representation
A tool to intract with your MicroPython board.
- Host: GitHub
- URL: https://github.com/atron-cc/atron-cli
- Owner: atron-cc
- License: mit
- Created: 2019-02-18T10:54:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T17:20:48.000Z (over 6 years ago)
- Last Synced: 2025-04-12T01:16:01.086Z (6 months ago)
- Topics: micropython
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Atron CLI
> A tool to intract with your MicroPython board.
> Based on Adafruit MicroPython Tool (ampy)
### Installation
##### Using pip
```
$ sudo pip install atron-cli
```
##### From source
```
$ git clone https://github.com/atron-cc/atron-cli
$ cd atron-cli
$ sudo python setup.py install
```
### Usage
```
$ atron -p /dev/ttyACM0
```
**Note** In non-windows platforms default port is /dev/ttyUSB0.
### Commands
##### Upload
The `upload` command will upload a python file to pyboard. Selected python file will be automatically minify.
Example(s):
```
$ atron --port /dev/ttyACM0 upload main.py
$ atron --port /dev/ttyACM0 upload blink.py main.py
```
##### Reset
The `reset` command will reset the pyboard. Default reset mode is `soft-reset`.
Example(s):
```
$ atron --port /dev/ttyACM0 reset
$ atron --port /dev/ttyACM0 reset --hard
```
##### Rm
The `rm` command will remove selected file from pyboard.
Example(s):
```
$ atron --port /dev/ttyACM0 rm main.py
```
##### Ls
The `ls` command will list files from pyboard.
Example(s):
```
$ atron --port /dev/ttyACM0 ls
$ atron --port /dev/ttyACM0 ls --recursive
$ atron --port /dev/ttyACM0 ls /flash --recursive
$ atron --port /dev/ttyACM0 ls /flash --recursive --long_format
```
##### Put
The `put` command will put file or directory to selected path in pyboard.
Second argument (called remote) is optional.
Example(s):
```
$ atron --port /dev/ttyACM0 put main.py
$ atron --port /dev/ttyACM0 put main.py hello.py
$ atron --port /dev/ttyACM0 put example
```
##### Run
The `run` command will run a python file from computer in pyboard. All of python codes in selected file will pass to pyboard in `raw repl` mode. If you want to see output from pyboard do not pass `--no-output` to the command.
Example(s):
```
$ atron --port /dev/ttyACM0 run main.py
$ atron --port /dev/ttyACM0 run main.py --no-output
```
##### Raw Command
The `raw-command` is like raw-repl mode. Atron will get a command, execute it on pyboard and then show result to you.
Example(s):
```
$ atron --port /dev/ttyACM0 raw-command
```