Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 2 months ago
JSON representation

A tool to intract with your MicroPython board.

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
```