Skip to content

Commit 40e03e3

Browse files
committed
basics
1 parent f2ab2e4 commit 40e03e3

File tree

18 files changed

+18
-31
lines changed

18 files changed

+18
-31
lines changed
Loading
Loading
Loading
Loading
Loading

content/micropython/03.micropython/01.basics/00. digital-io/digital-io.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ In this guide, we will be using some additional electronic components:
6262

6363
1. Open the [Arduino Lab for MicroPython]() application.
6464
2. Plug the Arduino board into the computer using a USB cable.
65-
![Connect board to computer.]()
66-
3. Press the connection button on the top left corner of the window.
67-
![Connect the editor to the board.]()
68-
4. The connected Arduino board should appear, and we can click it:
69-
![Select board.]()
65+
![Connect board to computer.](assets/usb-comp.png)
66+
3. Press the connection button on the top left corner of the window. The connected Arduino board should appear (by its port name), and we can click it:
67+
![Connect to the board in the editor.](assets/select-board-ide.png)
7068

7169
***Need help installing MicroPython on your board? Visit the [MicroPython installation guide]().***
7270

@@ -83,7 +81,7 @@ Connect an LED to the Arduino board, following the circuit diagram below:
8381
- Connect the anode (+) of the LED to a digital output pin.
8482
- Connect the cathode (-) of the LED through a resistor to `GND`.
8583

86-
![LED circuit.]()
84+
![LED circuit.](assets/LED.png)
8785

8886
***You can also use the built-in LED on your board, if you do not have an external LED.***
8987

@@ -133,16 +131,14 @@ When a digital input pin is not connected to a definite HIGH or LOW voltage, it
133131

134132
These internal resistors are built into the microcontroller and can be enabled in your code, eliminating the need for external resistors.
135133

136-
![We can create a image here to explain that]()
137-
138134
### Example: Pull-Up Mode
139135

140136
In pull-up mode, the input pin is internally connected to a HIGH voltage level. When the input device (like a button) is activated and connects the pin to GND, the pin reads LOW (`0`).
141137

142138
- Connect one side of the button to **GND**.
143139
- Connect the other side to a digital input pin.
144140

145-
![Pull-up mode circuit.]()
141+
![Pull-up mode circuit.](assets/pull-up.png)
146142

147143
After completing the circuit diagram, copy the following code into your editor, and run the script.
148144

@@ -181,7 +177,7 @@ In pull-down mode, the input pin is internally connected to GND. When the input
181177
- Connect one side of the button to **3.3V** (or **5V**, depending on your board's logic level).
182178
- Connect the other side to a digital input pin.
183179

184-
![Pull-down mode circuit.]()
180+
![Pull-down mode circuit.](assets/pull-down.png)
185181

186182
After completing the circuit diagram, copy the following code into your editor, and run the script.
187183

content/micropython/03.micropython/01.basics/01. analog-io/analog-io.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ In this guide, we will be using some additional electronic components:
5454

5555
1. Open the [Arduino Lab for MicroPython]() application.
5656
2. Plug the Arduino board into the computer using a USB cable.
57-
![Connect board to computer.]()
58-
3. Press the connection button on the top left corner of the window.
59-
![Connect the editor to the board.]()
60-
4. The connected Arduino board should appear, and we can click it:
61-
![Select board.]()
57+
![Connect board to computer.](assets/usb-comp.png)
58+
3. Press the connection button on the top left corner of the window. The connected Arduino board should appear (by its port name), and we can click it:
59+
![Connect to the board in the editor.](assets/select-board-ide.png)
6260

6361
***Need help installing MicroPython on your board? Visit the [MicroPython installation guide]().***
6462

@@ -87,7 +85,7 @@ For this example, we will need the following external components:
8785

8886
Connect the photoresistor to the Arduino board, following the circuit diagram below:
8987

90-
![Photoresistor circuit.]()
88+
![Photoresistor circuit.](assets/photoresistor.png)
9189

9290
After completing the circuit diagram, copy the following code into your editor, and run the script.
9391

@@ -126,7 +124,7 @@ PWM is especially useful in applications where true analog output is not possibl
126124

127125
The main advantage of PWM is that it allows you to control analog-like behavior using digital pins, adding versatility to your projects while keeping power consumption efficient.
128126

129-
![How PWM works.]()
127+
![How PWM works.](assets/pwm.gif)
130128

131129
### Code Example: Dimming an LED with PWM
132130

@@ -141,7 +139,7 @@ For this example, we will need the following external components:
141139

142140
Connect the LED to the Arduino board, following the circuit diagram below:
143141

144-
![Photoresistor circuit.]()
142+
![LED circuit.](assets/LED.png)
145143

146144
After completing the circuit diagram, copy the following code into your editor, and run the script.
147145

Loading
Loading
Loading
Loading
Loading
Loading
Loading

content/micropython/03.micropython/01.basics/02. loops/loops.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ MicroPython is officially supported on several Arduino boards. Here’s a list o
4343

4444
1. Open the [Arduino Lab for MicroPython]() application.
4545
2. Plug the Arduino board into the computer using a USB cable.
46-
![Connect board to computer.]()
47-
3. Press the connection button on the top left corner of the window.
48-
![Connect the editor to the board.]()
49-
4. The connected Arduino board should appear, and we can click it:
50-
![Select board.]()
46+
![Connect board to computer.](assets/usb-comp.png)
47+
3. Press the connection button on the top left corner of the window. The connected Arduino board should appear (by its port name), and we can click it:
48+
![Connect to the board in the editor.](assets/select-board-ide.png)
5149

5250
***Need help installing MicroPython on your board? Visit the [MicroPython installation guide]().***
5351

@@ -63,11 +61,8 @@ To better understand these loops, let’s imagine them as tasks at the supermark
6361

6462
- **for loops** - imagine walking down a supermarket aisle with a shopping list that specifies exactly how many items to pick up, one by one, in order. Once you’ve gathered all the items on your list, your task is complete. This is like a `for` loop iterating over a sequence, handling each specified item one at a time.
6563

66-
![How for loops work.]()
67-
6864
- **while loops** - imagine going to the supermarket to buy a certain product that’s on sale, as long as it stays in stock. You keep coming back, day after day, until the sale ends or the stock runs out. In a `while` loop, you keep “coming back” as long as a condition (like the sale continuing) remains true.
6965

70-
![How while loops work.]()
7166

7267
## For Loops
7368

Loading
Loading

content/micropython/03.micropython/01.basics/03.data-logger/data-logger.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ MicroPython is officially supported on several Arduino boards. Here’s a list o
4545

4646
1. Open the [Arduino Lab for MicroPython]() application.
4747
2. Plug the Arduino board into the computer using a USB cable.
48-
![Connect board to computer.]()
49-
3. Press the connection button on the top left corner of the window.
50-
![Connect the editor to the board.]()
51-
4. The connected Arduino board should appear, and we can click it:
52-
![Select board.]()
48+
![Connect board to computer.](assets/usb-comp.png)
49+
3. Press the connection button on the top left corner of the window. The connected Arduino board should appear (by its port name), and we can click it:
50+
![Connect to the board in the editor.](assets/select-board-ide.png)
5351

5452
***Need help installing MicroPython on your board? Visit the [MicroPython installation guide]().***
5553

0 commit comments

Comments
 (0)