Skip to content

Commit e27e94b

Browse files
Eddited Code Editor
1 parent 5d9f72e commit e27e94b

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed
Loading
Loading
Loading

content/micropython/03.micropython/02.environment/01.code-editor/code-editor.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,39 @@ As we get familiar with the editor, remember that MicroPython has a few syntax r
2626

2727
### Overview
2828

29-
Text / bullet points here summarizing e.g. buttons and icons in the editor.
29+
The Arduino Lab for MicroPython editor provides several essential tools to make coding intuitive and efficient:
3030

31-
![Overview of the code editor.]()
31+
1.**Connect/Disconnect Board**: Use this button to connect or disconnect your MicroPython-compatible board. This allows the code editor to communicate with your board for running and testing code.
32+
2.**Run/Stop Script**: Click this button to run or stop your script. The output will be displayed in the REPL, providing immediate feedback or error messages.
33+
3.**File Management**: This option lets you manage files on your MicroPython board. You can upload, download, and organize your scripts.
34+
4.**Edit Script**: The main area of the editor where you write and modify your MicroPython code. It provides features like syntax highlighting to enhance readability.
35+
5.**Expand Terminal**: Use this button to expand or collapse the terminal section, which displays the REPL output, helping you debug and interact with your code in real time.
36+
37+
![Overview of the code editor.](assets/IDEOverview.png)
3238

3339
### Files
3440

35-
Text / bullet points here for how to manage files (and point to the file system tutorial)
41+
Managing files in the Arduino Lab for MicroPython is straightforward and allows for efficient organization and transfer between your board and computer:
42+
43+
1. **Board Storage**: This section displays the files stored on your MicroPython-compatible board. You can view and manage scripts or data saved directly on the board.
44+
2. **Computer Storage**: This section shows the files on your computer, allowing you to select and manage files for uploading or downloading.
45+
3. **Download/Upload Files**: Use this option to transfer files between your computer and your board. You can upload new scripts or download data logs from your board.
46+
4. **Create File/Folder**: This option lets you create new files or folders directly on the board or in your project directory, making it easy to organize your code and assets.
3647

37-
![Managing files in Arduino Lab for MicroPython]()
48+
![Managing files in Arduino Lab for MicroPython](assets/IDEFileManager.png)
49+
50+
***For a detailed tutorial on using the file system, please refer to the [File System Tutorial]().***
3851

3952
### REPL
4053

41-
Text / bullet points here for where the REPL is and how it works (and point to the REPL tutorial)
54+
The REPL can be found by expanding the terminal. Here you can interact with the terminal. The buttons allow for basic features like copy and pasting as the shortcuts like ```CTRL+C will´´´ not work on this window.
55+
56+
![The REPL.](assets/consoleTerminal.png)
57+
***For a detailed tutorial on using the file system, please refer to the [File System Tutorial]().***
4258

43-
![The REPL.]()
59+
## Code Editor
4460

45-
## Indentation
61+
### Indentation
4662

4763
In MicroPython, indentation (using spaces or tabs) is essential for defining the structure of our code. Unlike many other languages, MicroPython relies on indentation instead of symbols like `{ }` to define code blocks.
4864

@@ -61,12 +77,12 @@ def greet(name):
6177

6278
In this example, each level of code indentation clearly defines which lines belong to which block. The `print` statements align under the `if` and `else` statements, showing they’re part of those blocks.
6379

64-
### Avoiding Common Indentation Mistakes
80+
#### Avoiding Common Indentation Mistakes
6581

6682
- **Mixing Tabs and Spaces**: Use either spaces or tabs consistently. Mixing them can lead to indentation errors. Tabs are generally preferred as these are easier to keep consistency.
6783
- **Missing Indentation**: Every line within a block (like the lines inside the `if` statement) must be indented correctly. If not, we’ll encounter syntax errors.
6884

69-
## Comments: Inline and Multiline
85+
### Comments: Inline and Multiline
7086

7187
Comments are essential for making our code understandable and documenting complex logic. In MicroPython:
7288

@@ -91,7 +107,7 @@ Comments are essential for making our code understandable and documenting comple
91107

92108
Using comments effectively helps both us and others understand the code’s purpose and logic.
93109

94-
## MicroPython Syntax: No Semicolons Needed!
110+
### MicroPython Syntax: No Semicolons Needed!
95111

96112
In MicroPython, each statement ends automatically at the end of a line, so there’s no need to use semicolons (`;`) as in languages like C++ or Java. This simplifies code and makes it cleaner and easier to read.
97113

0 commit comments

Comments
 (0)