mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Document the new methods for mapping UART0 TX to GPIO2
This commit is contained in:
parent
ecdbda8796
commit
fbc7eb9f85
@ -76,6 +76,8 @@ more than 20 milliseconds is not recommended.
|
|||||||
|
|
||||||
`Serial1` uses UART1, TX pin is GPIO2. UART1 can not be used to receive data because normally it's RX pin is occupied for flash chip connection. To use `Serial1`, call `Serial1.begin(baudrate)`.
|
`Serial1` uses UART1, TX pin is GPIO2. UART1 can not be used to receive data because normally it's RX pin is occupied for flash chip connection. To use `Serial1`, call `Serial1.begin(baudrate)`.
|
||||||
|
|
||||||
|
If `Serial1` is not used and `Serial` is not swapped - TX for UART0 can be mapped to GPIO2 instead by calling `Serial.set_tx(2)` after `Serial.begin` or directly with `Serial.begin(baud, config, mode, 2)`.
|
||||||
|
|
||||||
By default the diagnostic output from WiFi libraries is disabled when you call `Serial.begin`. To enable debug output again, call `Serial.setDebugOutput(true)`. To redirect debug output to `Serial1` instead, call `Serial1.setDebugOutput(true)`.
|
By default the diagnostic output from WiFi libraries is disabled when you call `Serial.begin`. To enable debug output again, call `Serial.setDebugOutput(true)`. To redirect debug output to `Serial1` instead, call `Serial1.setDebugOutput(true)`.
|
||||||
|
|
||||||
You also need to use `Serial.setDebugOutput(true)` to enable output from `printf()` function.
|
You also need to use `Serial.setDebugOutput(true)` to enable output from `printf()` function.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user