Skip to content

SerialEvent() update (add Due) #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Language/Functions/Communication/Serial/serialEvent.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void serialEvent() {
}
----

The Mega 2560 R3 has additional serial ports which can be accessed by adding the corresponding number at the end of the function.
The Mega 2560 R3 and Due boards have additional serial ports which can be accessed by adding the corresponding number at the end of the function.

[source,arduino]
----
Expand Down Expand Up @@ -67,9 +67,9 @@ Nothing

[float]
=== Notes and Warnings
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 and ATmega2560 chips.
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*, *Mega 2560 R3* and *Due*.

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.
Instead, you can use the link:../available[`available()`] method. Examples in this page demonstrates how to read serial data only when it is available, similarly to how `Serial.event()` is implemented.
[%hardbreaks]

--
Expand Down