In Maixduino, there are two types of serial devices,
Serial corresponds to the
UARTHSClass, and the remaining
Serial uses the default pin as 4 (RX), 5 (TX).
So you can use it in the serial monitor on your computer.The default pins for the other three global serial ports are 6(RX), and 7(TX) (they are connected to the WiFi module),To use them correctly, set different pins for them in
The operation of the serial port is exactly the same as that of Arduino. You can find more information on the Arduino website.
Serial.begin(BaudRate, RX , TX )