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: Language/Functions/Communication/Serial/serialEvent.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ title: serialEvent()
15
15
[float]
16
16
=== Description
17
17
Called at the end of link:../../../../structure/sketch/loop[`loop()`] when data is available. Use `Serial.read()` to capture this data.
18
+
19
+
*Please note:* most modern boards do not support this method. See "Notes and Warnings" further below this article.
18
20
[%hardbreaks]
19
21
20
22
@@ -63,11 +65,9 @@ Nothing
63
65
64
66
[float]
65
67
=== Notes and Warnings
66
-
`serialEvent()` doesn't work on the Leonardo, Micro, or Yún.
67
-
68
-
`serialEvent()` and `serialEvent1()` don't work on the Arduino SAMD Boards
68
+
Please note that `serialEvent()` *does not work* on any modern Arduino boards. The only recognized boards to have support as of 2023年12月06日 is the *UNO R3* and *Mega 2560 R3*, which are based on the ATmega328P chip.
69
69
70
-
`serialEvent()`, `serialEvent1()`, `serialEvent2()`, and `serialEvent3()` don't work on the Arduino Due.
70
+
Instead, you can use the link:../available[`available()`] method. Examples in this page demonstrates how to read serial data only when it is available, which is exactly what `Serial.event()` does.
0 commit comments