Keyestudio KS0436 Kit Manual page 33

Table of Contents

Advertisement

one by one.
delay(200);
}
for (int i = BASE; i < BASE + NUM; i ++)
{
digitalWrite(i, HIGH);
one by one
delay(200);
}
}
 Single line comments start with
Code Explanation:
of that line is considered a comment.
Comments are a great way to leave notes in your code explaining
why you wrote it the way you did.
int BASE = 2 ; // set the I/O pin for the first LED
int NUM = 6; // the number of LEDs
// delay
// set I/O pins as"high" , turn on LEDs
// delay
//
and everything up until the end
33

Advertisement

Table of Contents
loading

Table of Contents