www.keyestudio.com
Then click"Write", open serial monitor to view if there is a "0"
signal
(7) Code Explanation
Serial.available()
: The current rest characters when return to
buffer area. 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()"
(8) Extension Practice
We could send a command via cellphone to turn on and off a LED.
D10 is connected to a LED, as shown below:
128