www.keyestudio.com
(6) Code Explanation
Serial.available()
Generally, this function is used to judge if there is data in buffer. When
Serial.available()>0, it means that serial receives the data and can be read
Serial.read():Read a data of a Byte in buffer of serial port, for instance,
device sends data to Arduino via serial port, then we could read data by
"Serial.read()"
(7) Extension Practice
We could send a command via Bluetooth to turn on and off a LED.
D3 is connected to a LED, as shown below:
/*
keyestudio smart turtle robot
lesson 7.2
: The current rest characters when return to buffer area.
125