Complete the code to initialize the Bluetooth serial communication at 9600 baud.
Serial[1](9600);
The begin function starts serial communication at the specified baud rate.
Complete the code to check if data is available to read from Bluetooth.
if (Serial.[1]() > 0) {
The available() function returns the number of bytes available to read.
Fix the error in reading a byte from Bluetooth and storing it in variable command.
char command = Serial.[1]();The read() function reads one byte from the serial buffer.
Fill both blanks to read a command and check if it equals 'A'.
if (Serial.[1]() > 0) { char command = Serial.[2](); if (command == 'A') { // Do something } }
First, check if data is available with available(), then read it with read().
Fill all three blanks to read a command, check if it is 'B', and send a response 'OK'.
if (Serial.[1]() > 0) { char command = Serial.[2](); if (command == '[3]') { Serial.println("OK"); } }
Check if data is available, read it, then compare to character 'B'. If true, send "OK".
