Complete the code to start serial communication at 9600 baud.
void setup() {
Serial.[1](9600);
}
void loop() {
// sensor reading code
}The Serial.begin(9600); command starts serial communication at 9600 baud rate.
Complete the code to read an analog sensor value from pin A0.
int sensorValue = [1](A0);The analogRead(A0); function reads the analog value from pin A0.
Fix the error in sending the sensor value to the computer.
Serial.[1](sensorValue);The correct function to send data over serial is Serial.print().
Fill both blanks to send the sensor value followed by a new line.
Serial.[1](sensorValue); Serial.[2]();
Use Serial.print() to send the value and Serial.println() to add a new line.
Fill all three blanks to read sensor data, send it, and add a delay.
int sensorValue = [1](A1); Serial.[2](sensorValue); delay([3]);
Read analog value with analogRead(), send it with Serial.print(), and pause for 1000 milliseconds with delay(1000);.
