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
586 KB
Loading
613 KB
Loading
613 KB
Loading
216 KB
Loading
8.8 KB
Loading

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

Lines changed: 6 additions & 10 deletions
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

Lines changed: 6 additions & 8 deletions
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

586 KB
Loading
617 KB
Loading
189 KB
Loading

0 commit comments

Comments
 (0)