-
-
Notifications
You must be signed in to change notification settings - Fork 37
Merging develop to main #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 46 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
2f7be45
Adjust layout and theme
murilopolese c240a5e
updated application icon
ubidefeo 68825b4
fixed app icon shadow
ubidefeo d047416
Same file update event for saving and uploading files to the board
murilopolese 44c2bae
Adjusting button style
murilopolese e97a3b6
Connected and disconnected status
murilopolese 8f77cb2
Organizing files and adding comments
murilopolese cb4b0fb
Wait for code be executed before running other script
murilopolese 9d28eab
Write files with python multi line comments
murilopolese bcff4f9
Using method from `pyboard.py` to get file contents from board
murilopolese 26f7253
Merge branch 'main' into develop
murilopolese 237b7c6
Updating project dependencies and start migrating to new micropython.js
murilopolese 3ddfd9a
Drafting store events with promise based micropython.js
murilopolese 41a2e0e
Drafting serial fs operations
murilopolese ce4c324
Update dependencies and package json scripts
murilopolese 4a2cf20
Arduino UI with terminal
murilopolese 2d3f9ea
Listing and loading files from serial
murilopolese c4379f9
Saving to the board
murilopolese 4c89089
Open, list and select disk files
murilopolese 12a8574
Save disk files
murilopolese 667259d
Rename and create new files over serial connection
murilopolese b8ffc01
Rename and create files on disk
murilopolese a30b66e
Save file name on blur input
murilopolese 2104ac0
Download and upload files
murilopolese 8fe770c
Add icons and fix upload/download
murilopolese e8a9e9d
Editor size fix
murilopolese 7dfb454
Update toolbar icons
murilopolese b79c273
Fix download from board to disk
murilopolese 9a52c00
Sync project version with release version
murilopolese 171a7fd
Clean old icons
murilopolese 0040c32
Resize editor correctly on content update
murilopolese 1f3fec3
Adjust colors and buttons
murilopolese 93d8981
Change label on file manager
murilopolese 605188a
Fixing bug with file renaming
murilopolese 2025976
Updating micropython.js
murilopolese fd1f48d
Connection messages
murilopolese 0a0935b
Sticky disconnection message
murilopolese b571808
Comments and logs
murilopolese 93c9862
Using the message box to indicate pending upload/download
murilopolese 74c1927
Slow down fs_put so it works on Nano boards
murilopolese 0445cfa
set version to 0.3.0-alpha
ubidefeo bdf3e6c
Resizeable panel
murilopolese 6a6e824
Merge pull request #6 from arduino/bugfix/resize-panel
murilopolese d74c840
Add readme
murilopolese e91204d
Update readme
murilopolese 9f9f835
Merge branch 'main' into develop
murilopolese f685450
Update with the new name
stevisco bb00962
Update index.html
stevisco d5228fc
fixed cursor offset Windows | updated version to 0.3.1
ubidefeo 738a901
fixed package json name | updated window title
ubidefeo c1f6674
fixed typo in file name
ubidefeo b4fed09
changed port list filter from manufacturer to serialNumber to clean-u…
ubidefeo 56c5d90
added package.json entry to generate aptly named application
ubidefeo a3e5f3c
Remove blank UI
murilopolese 47a0bfe
Remove responsivity
murilopolese 9cd5fd5
Filter USB ports by `vendorId` and `productId`
murilopolese 298369c
Resize editor with bottom drawer (panel)
murilopolese 0109376
Custom menu
murilopolese ef57b0d
Clear terminal
murilopolese c5e47fe
Copy and paste from terminal
murilopolese 1b923cd
Filter out dot files and folder
murilopolese fec93ea
Show a dialog to decide where to create new file
murilopolese b6293ae
updated icons
ubidefeo 0287453
added about-window package
ubidefeo 275d0d8
added conditional for dev detection > dev tools
ubidefeo 2c1ed17
updated about box CSS - cleanup
ubidefeo 31ad131
fixed URL
ubidefeo 42fe6ae
updated URLs in Help menu
ubidefeo c44e194
cleaned up code according to @murilopolese 's review
ubidefeo e877d4e
removed info object
ubidefeo 1e019d1
Merge pull request #9 from arduino/about-box
murilopolese File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,74 @@ | ||
# Arduino MicroPython Lab | ||
|
||
A lightweight editor for MicroPython supporting connection with a board, code upload, file transfer, interactive REPL shell. | ||
Arduino MicroPython Lab is an Integrated Development Environment (IDE) for MicroPython. | ||
|
||
## Features | ||
- MicroPython's Read Eval Print Loop (REPL) | ||
- Enter paste mode | ||
- Enter raw repl | ||
- Software reset | ||
- File system management (Disk and MicroPythons File System) | ||
- Create | ||
- Rename | ||
- Remove | ||
- Upload | ||
- Download | ||
- Text editor with Python syntax highlight | ||
- Code execution controls | ||
- Run what's on text editor | ||
- Stop (keyboard interrupt) | ||
- Soft reset | ||
|
||
## Technical | ||
|
||
Arduino MicroPython Lab 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`. | ||
|
||
All operations over serial are abstracted and packaged on `/micropython.js` which is an attempt of porting `pyboard.py`. The port has its [own repository](https://github.com/murilopolese/micropython.js) but for the sake of simplicity and transparency, `micropython.js` is committed as source code. | ||
|
||
The User Interface (UI) source code stays inside `/ui` folder and is completely independent of the Electron code. | ||
|
||
The communication between interface and Electron app is accomplished by using the methods and events specified by `/preload.js`. | ||
|
||
## Folder structure | ||
|
||
At the root of the repository you will find: | ||
|
||
- `/.github`: Github's workflow configuration. | ||
- `/build_resources`: Icons and other assets used during the build process. | ||
- `/scripts`: Scripts executed during the build process. | ||
- `/ui`: Available user interfaces. | ||
- `/index.js`: Main Electron code. | ||
- `/micropython.js`: Serial connection abstraction. | ||
- `/preload.js`: Creates Disk and Serial APIs on Electron's main process and exposes it to Electron's renderer process (context bridge). | ||
|
||
## Arduino UI | ||
|
||
Arduino's 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. | ||
|
||
The dependencies and source code are included manually in the `/ui/arduino/index.html` file. | ||
|
||
The app is a standard [choo-choo](https://github.com/choojs/choo) app and it has: | ||
|
||
- `/ui/arduino/app.js`: A router deciding which view to load. | ||
- `/ui/arduino/components`: HTML templates and components. | ||
- `/ui/arduino/store.js`: A "store" that handles events emitted by the views, change the app state and orchestrate re-rendering. | ||
- `/ui/arduino/libs`: Prebuilt dependencies. | ||
|
||
It can be useful to learn more about [Choo](https://github.com/choojs/choo) or the [Elm Architecture](https://guide.elm-lang.org/architecture/). | ||
|
||
## Disk and Serial API | ||
|
||
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. | ||
|
||
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). | ||
|
||
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` | ||
|
||
## Running Arduino MicroPython Lab from source code | ||
|
||
1. Clone this repository: `git clone https://github.com/arduino/MicroPython_Lab.git` | ||
2. Navigate to repository folder: `cd MicroPython_Lab` | ||
3. Install dependencies: `npm install` | ||
4. Run dev mode: `npm run dev` | ||
|
||
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). |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.