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: README.md
+15-23
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,31 @@
1
1
# Arduino Lab for MicroPython
2
2
3
-
Arduino Lab for MicroPython is a lightweight editor for MicroPython programs, supporting connection with a board, code upload, file transfer, interactive REPL shell.
4
-
This project is sponsored by Arduino, based on original work by Murilo Polese. This is an experimental pre-release software, please direct any questions only to Github issues.
3
+
Arduino Lab for MicroPython is a lightweight editor for MicroPython programs, supporting connection with a board, code upload, file transfer and interactive REPL shell.
4
+
This project is sponsored by Arduino, based on original work by [Murilo Polese](http://www.murilopolese.com). This is an experimental pre-release software, please direct any questions only to Github issues.
5
5
6
6
## Features
7
7
- MicroPython's Read Eval Print Loop (REPL)
8
8
- Enter paste mode
9
9
- Enter raw repl
10
10
- Software reset
11
+
- Tab to autocomplete
11
12
- File system management (Disk and MicroPython File System)
12
13
- Create
13
14
- Rename
15
+
- Multiple file and folder selection
14
16
- Remove
15
17
- Upload
16
18
- Download
17
-
- Text editor with Python syntax highlight
18
-
- Code execution controls
19
+
- Text editor
20
+
- Python syntax highlight and autocomplete
21
+
- Multiple tabs
22
+
- Rename tabs
23
+
- Code execution
19
24
- Run what's on text editor
20
25
- Stop (keyboard interrupt)
21
26
- Soft reset
22
27
23
-
## Technical
28
+
## Technical overview
24
29
25
30
Arduino Lab for MicroPython is an [Electron](https://www.electronjs.org/) app that has its main purpose to communicate over serial with a microprocessor running [MicroPython](https://micropython.org/). All Electron code is at `/index.js`.
26
31
@@ -36,33 +41,21 @@ At the root of the repository you will find:
36
41
37
42
-`/.github`: Github's workflow configuration.
38
43
-`/build_resources`: Icons and other assets used during the build process.
39
-
-`/scripts`: Scripts executed during the build process.
40
44
-`/ui`: Available user interfaces.
41
45
-`/index.js`: Main Electron code.
42
-
-`/preload.js`: Creates Diskand Serial APIs on Electron's main process and exposes it to Electron's renderer process (context bridge).
46
+
-`/preload.js`: Creates Disk, Serial and Window APIs on Electron's main process and exposes it to Electron's renderer process (context bridge).
43
47
44
-
## Arduino UI
48
+
## User interface
45
49
46
-
Default UI is a [choo-choo](https://github.com/choojs/choo) app. It has pre-built dependencies so no build process is required for the interface.
47
-
48
-
The dependencies and source code are included manually in the `/ui/arduino/index.html` file.
49
-
50
-
The app is a standard [choo-choo](https://github.com/choojs/choo) app and it has:
51
-
52
-
-`/ui/arduino/app.js`: A router deciding which view to load.
53
-
-`/ui/arduino/components`: HTML templates and components.
54
-
-`/ui/arduino/store.js`: A "store" that handles events emitted by the views, change the app state and orchestrate re-rendering.
55
-
-`/ui/arduino/libs`: Prebuilt dependencies.
56
-
57
-
It can be useful to learn more about [Choo](https://github.com/choojs/choo) or the [Elm Architecture](https://guide.elm-lang.org/architecture/).
50
+
Read more at [`/ui/arduino/README.md`](./ui/arduino/README.md)
58
51
59
52
## Disk and Serial API
60
53
61
54
In order for the UI code to be independent of Electron code, there is an API defined at `/preload.js` that describes all the allowed operations.
62
55
63
-
There are 2 main operation "channels": Serial communication and local Filesystem operations. Both channels offer methods that always return promises and are used mostly through [`async`/`await`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
56
+
There are 3 main operation "channels": Serial communication, local filesystem and window operations. These channels offer methods that should always return promises and are used mostly through [`async`/`await`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
64
57
65
-
While the serial communication is mediated by `/micropython.js`, the local filesystem operations are done through Electron's `ipcRenderer` calls. The handlers for these calls are defined at `/index.js`
58
+
While the serial communication is mediated by `/micropython.js`, the local filesystem and window operations are done through Electron's `ipcRenderer` calls. The handlers for these calls are defined at `/index.js`
66
59
67
60
## Running Arduino Lab for MicroPython from source code
68
61
@@ -73,7 +66,6 @@ While the serial communication is mediated by `/micropython.js`, the local files
73
66
74
67
Some changes on the Electron code will require reopening the app but all UI changes will only require refreshing the window (ctrl-r/cmd-r).
75
68
76
-
77
69
## Trademarks
78
70
79
71
"Python" and the Python Logo are trademarks of the Python Software Foundation.

4
+

5
+
6
+
This UI is a [choo-choo](https://github.com/choojs/choo) app. It has pre-built dependencies so *no build process* is required for the interface.
7
+
8
+
The dependencies and source code are included manually in the `/ui/arduino/index.html` file. *No installation process* is required for the UI.
9
+
10
+
The is a standard [choo-choo](https://github.com/choojs/choo) app. It can be useful to learn more about [Choo](https://github.com/choojs/choo) or the [Elm Architecture](https://guide.elm-lang.org/architecture/).
11
+
12
+
In this folder you will find:
13
+
14
+
-`/ui/arduino/main.js`: A router deciding which view to load.
15
+
-`/ui/arduino/store.js`: A "store" that handles events emitted by the views, change the app state and orchestrate re-rendering.
16
+
-`/ui/arduino/libs`: Prebuilt dependencies.
17
+
-`/ui/arduino/views`: HTML views, components and elements.
18
+
- Views: Page size layouts
19
+
- Components: Independent sections that assemble the page layout
20
+
- Elements: Thin abstraction on top of HTML tags.
21
+
-`/ui/arduino/media`: Icons and image assets.
22
+
-`/ui/arduino/documents`: System model and layout.
23
+
-`/ui/arduino/helpers.py`: MicroPython functions that enable some of the UI features.
0 commit comments