EasyManua.ls Logo

AZ-Delivery D1 Mini - Serial Communication; The I2 C and SPI Interfaces

AZ-Delivery D1 Mini
27 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
- 12 -
Serial communication
To use UART0 (TX = GPIO1, RX = GPIO3), use the Serial object, just like on
an Arduino board: Serial.begin(baud_reate)
To use the alternative pins (TX = GPIO15, RX = GPIO13), use the following
line of code: Serial.swap()
after Serial.begin()
To use UART1 (TX = GPIO2), use the Serial1 object.
NOTE: All Arduino stream functions, like read(), write(), print(), println(), etc.
are supported as well.
The I2C and SPI interfaces
For the I2C and SPI interface use the default Arduino library syntax.