Skip to content

Commit 9ccf95d

Browse files
committed
Added some details
1 parent 1b24f67 commit 9ccf95d

File tree

1 file changed

+36
-26
lines changed

1 file changed

+36
-26
lines changed

docs/app-specification.md

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
# Arduino App specification
22

3-
This is the specification for the `Arduino App` (from now on called App) format to be used with `arduino-app-cli` and `Arduino App Lab`.
3+
This is the specification for the Arduino App format to be used with `arduino-app-cli` and `Arduino App Lab`.
4+
An Arduino App is a combination of multiple pieces of software that interacts with each other as single application. In particular an Arduino App may be composed by:
5+
6+
- An Arduino Sketch that runs on a microcontroller (MCU) which performs real-time tasks interacting with sensors and actuators.
7+
- A Python program that runs on a Linux OS which performs CPU intensive tasks (like network API, database, GUI, etc.).
8+
- One or more AI models and runners.
9+
- Docker containers.
10+
11+
The list above is not meant to be complete, and other type of components may be added in the future.
12+
The Arduino App CLI and the Arduino AppLab Desktop IDE offers a simplified and automated way to deploy an Arduino App, taking care of all the steps needed to run the whole application (including building and uploading the firmware, or handling Docker containers).
413

514
# Arduino App Folder structure
615

7-
An App is a self-contained folder that includes the following components:
16+
An Arduino App is a folder including:
817

9-
- `app.yaml` (mandatory) the file descriptor of the app in YAML format.
10-
- `sketch` (optional) the folder containing an Arduino [Sketch](https://arduino.github.io/arduino-cli/1.3/sketch-specification/)).
11-
- `python` (optional) the folder containing the Python code.
18+
- The `app.yaml` file: this is the descriptor of the application in YAML format.
19+
- A `sketch` folder: containing an [Arduino Sketch](https://arduino.github.io/arduino-cli/1.3/sketch-specification/)).
20+
- A `python` folder: containing Python code.
21+
- A `docs` folder reserved for the app documentation.
22+
- A `README.md` file
1223

13-
At least one on `sketch` or `python` folder must be present.
14-
The App must be self-contained (it does not contain references to external files) because this means it can be exported, shared, or zipped easily.
24+
The `app.yaml` file and at least one of the `sketch` or `python` folder must be present.
25+
26+
The Arduino App must be self-contained (it does not contain references to external files) because this means it can be exported, shared, or zipped easily.
1527

1628
The user-defined apps are saved into `/home/arduino/ArduinoApps` folder.
1729
The builtin-apps are stored into `home/arduino/.local/share/arduino-app-cli/examples` folder.
@@ -29,20 +41,15 @@ my-app/
2941
main.py
3042
```
3143

32-
## `README.md` file
33-
34-
An (optional) readme file in markdown.
35-
The link to local resources must be in the same folder of the app. For example, a png inside the folder `myapp/docs/my-banner.png` can be referenced using ![My App](docs/my-banner.png) syntax.
36-
3744
### `app.yaml` file descriptor
3845

39-
The `app.yaml` (or `app.yml`) is a YAML file that describes an App.
46+
The `app.yaml` is a YAML file that describes an App. The field available in this file are:
4047

41-
- `name`: (optional) a short name of the app.
42-
- `description`: (optional) a brief description of the app.
43-
- `icon`: (optional) the emoji of the app
44-
- `ports`: (optional) a list of ports to be exposed externally. If not given a random port is opened (if necessary).
45-
- `bricks` (optional) a list of bricks used by the app with its variable definitions.
48+
- `name`: A short name of the app.
49+
- `description`: A brief description of the app.
50+
- `icon`: The emoji of the app.
51+
- `ports`: A list of TCP ports to be exposed externally. If not given a random port is opened (if necessary).
52+
- `bricks`: A list of bricks used by the app with its variable definitions.
4653

4754
Example:
4855

@@ -64,19 +71,22 @@ bricks:
6471
model: yolo
6572
```
6673
67-
### `sketch` sub folder
74+
### `README.md` file
75+
76+
This is a readme file in markdown format. Resources in the app may be linked directly, in particular images or other documentation pages in the `docs` folder.
77+
78+
### `sketch` folder
6879

69-
The content of the `sketch` subfolder contains the Ardiuno skecth.
70-
It must omply with the [Sketch specification](https://arduino.github.io/arduino-cli/1.3/sketch-specification/).
80+
The `sketch` subfolder contains an Arduino Skecth, it must comply with the [Sketch specification](https://arduino.github.io/arduino-cli/1.3/sketch-specification/).
7181

72-
If present it must contain the followign files:
82+
If present it must contain at least the following files:
7383

74-
- `sketch.ino`
75-
- `sketch.yaml` that is compliant to the [Sketch project file](https://arduino.github.io/arduino-cli/1.3/sketch-project-file/)
84+
- `sketch.ino`: The main sketch source code.
85+
- `sketch.yaml`: The sketch project file (more info in the [Sketch Project file specification](https://arduino.github.io/arduino-cli/1.3/sketch-project-file/)).
7686

77-
### `python` sub folder
87+
### `python` folder
7888

79-
The content of the `python` contains the python code.
89+
The `python` contains the Python code.
8090

8191
If present, it must contain the `main.py` with the python code of the main.
8292
Optionally, a `requirements.txt` with additional python package dependencies to be installed.

0 commit comments

Comments
 (0)