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: content/micropython/01.basics/08.reference/reference.md
+27-21Lines changed: 27 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,17 +77,17 @@ For example:
77
77
-[detachInterrupt()](#detachinterrupt)
78
78
-[Communication](#communication)
79
79
-[Serial (USB)](#serial-usb)
80
-
-[print()](#print)
81
-
-[Serial (UART)](#serial-uart)
82
-
-[begin()](#begin)
83
-
-[available()](#available)
84
-
-[read()](#read)
85
-
-[write()](#write)
80
+
-[Serial.print()](#serialprint)
81
+
-[Serial1 (UART)](#serial1-uart)
82
+
-[Serial1.begin()](#serial1begin)
83
+
-[Serial1.available()](#serial1available)
84
+
-[Serial1.read()](#serial1read)
85
+
-[Serial1.write()](#serial1write)
86
86
-[SPI](#spi)
87
-
-[begin()](#begin-1)
88
-
-[read()](#read-1)
89
-
-[transfer()](#transfer)
90
-
-[read() \& write()](#read--write)
87
+
-[SPI.begin()](#spibegin)
88
+
-[SPI.read()](#spiread)
89
+
-[SPI.write()](#spiwrite)
90
+
-[SPI.transfer()](#spitransfer)
91
91
-[Bit Size](#bit-size)
92
92
-[Wire / I2C](#wire--i2c)
93
93
-[Wire.begin()](#wirebegin)
@@ -929,7 +929,7 @@ The same API is used for sending and receiving data over UART, using `Serial1`.
929
929
In MicroPython, to send data over USB, we can use the `print()` function, which prints the content to the REPL. As MicroPython is implemented a bit differently, the REPL also allows you to write commands inside it. The REPL is therefore in many ways, different from the Serial Monitor we are used to in the Arduino IDE.
930
930
931
931
932
-
### print()
932
+
### Serial.print()
933
933
934
934
`print(content)`
935
935
@@ -946,11 +946,13 @@ print(58) # prints a numeric value
946
946
print(f"The value is {variable}") # prints a string with a value inserted
947
947
```
948
948
949
-
## Serial (UART)
949
+
## Serial1 (UART)
950
950
951
-
UART communication is initialized using the `UART` object from the `machine` module.
951
+
UART communication is initialized using the `UART` object from the `machine` module.
952
952
953
-
### begin()
953
+
***When sending & receiving data on a hardware UART port on an Arduino board, we use the `Serial1` class.***
0 commit comments