Keyestudio Smart Little Turtle Robot V3 Manual page 66

Table of Contents

Advertisement

www.keyestudio.com
Let's modify the value of delay and remain the pin unchanged, then
observe how LED changes.
/*
keyestudio smart turtle robot
lesson 1.2
delay
http://www.keyestudio.com
*/
void setup()
{
// initialize digital pin 11 as an output.
pinMode(3, OUTPUT);
}
// the loop function runs over and over again forever
void loop()
{
digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for 0.1 second
digitalWrite(3, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for 0.1 second
66

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents