Serial

Used for communication between the Z-Uno board and another microcontroller or a computer via UART or USB. Z-Uno boards have the following serial interfaces:
  • Serial — By default it's routed to builtin USB2UART (CP2102N) adapter port.
  • Serial0 — UART on TX0(24) and RX0(25) pins
  • Serial1 — UART on TX1(7) and RX1(8) pins
You can change default pins of UART interface, using method begin()
Pinout
Compatibility pin table
Z-Uno pin # Serial TX Serial RX Serial0 TX Serial0 RX Serial1 TX Serial1 RX
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Please note, that Serial uses 128 bytes receiving buffer. You can use method begin() to set your own buffer. Please note, Serial uses sharable peripheral USARTn. SPI library uses the same peripheral. You are able to use up to 3 UART/SPI simultaneously. For example 2UART+1SPI or 3UART+0SPI or 1UART+2SPI and etc. Serial objects are binded to these peripherals:
Serial object Cortex peripheral
Serial USART2
Serial0 USART0
Serial1 USART1
Please note, every Serial object occupies one DMA channel for fast data receiving. Serial holds channel from begin() until you free its resources by means of end()
When you send data Serial object dynamically occupies another one DMA channel for data transfer time interval. Z-Uno builtin DMA controller supports up to 8 channels.
All Serial ports have the following methods supported:
  • available()
  • begin()
  • dumpPrint()
  • end()
  • find()
  • findUntil()
  • fixPrint()
  • flush()
  • formatPrint()
  • parseFloat()
  • parseInt()
  • peek()
  • print()
  • printf()
  • println()
  • read()
  • readBytes()
  • readBytesUntil()
  • readString()
  • readStringUntil()
  • setTimeout()
  • write()