Project 4: Servo Control - Keyestudio Smart Little Turtle Robot V3 Manual

Table of Contents

Advertisement

www.keyestudio.com
Serial.println(val_R);
delay(500);// delay in between reads for stability
if ((val_L == LOW) || (val_M == LOW) || (val_R == LOW))//if left line
tracking sensor detects signals
{
Serial.println("HIGH");
digitalWrite(3, HIGH);//LED is off
}
else//if left line tracking sensor doesn't detect signals
{
Serial.println("LOW");
digitalWrite(3, LOW);//LED is off
}
}
//****************************************************************************
Upload the code to development board, we could find LED light up when
covering the line tracking sensor by hand

Project 4: Servo Control

83

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents