You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/app-specification.md
+36-26Lines changed: 36 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,29 @@
1
1
# Arduino App specification
2
2
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).
4
13
5
14
# Arduino App Folder structure
6
15
7
-
An App is a self-contained folder that includes the following components:
16
+
An Arduino App is a folder including:
8
17
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
12
23
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.
15
27
16
28
The user-defined apps are saved into `/home/arduino/ArduinoApps` folder.
17
29
The builtin-apps are stored into `home/arduino/.local/share/arduino-app-cli/examples` folder.
@@ -29,20 +41,15 @@ my-app/
29
41
main.py
30
42
```
31
43
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  syntax.
36
-
37
44
### `app.yaml` file descriptor
38
45
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:
40
47
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.
46
53
47
54
Example:
48
55
@@ -64,19 +71,22 @@ bricks:
64
71
model: yolo
65
72
```
66
73
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
68
79
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/).
71
81
72
-
If present it must contain the followign files:
82
+
If present it must contain at least the following files:
73
83
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/)).
76
86
77
-
### `python` sub folder
87
+
### `python` folder
78
88
79
-
The content of the `python` contains the python code.
89
+
The `python` contains the Python code.
80
90
81
91
If present, it must contain the `main.py` with the python code of the main.
82
92
Optionally, a `requirements.txt` with additional python package dependencies to be installed.
0 commit comments