Keyestudio ARDUINO maker learning kit Manual page 34

Table of Contents

Advertisement

Sample program
//////////////////////////////////////////////////////////
int BASE = 2 ; // the I/O pin for the first LED
int NUM = 6;
// number of LEDs
void setup()
{
for (int i = BASE; i < BASE + NUM; i ++)
{
pinMode(i, OUTPUT);
}
}
void loop()
{
for (int i = BASE; i < BASE + NUM; i ++)
{
digitalWrite(i, LOW);
delay(200);
}
for (int i = BASE; i < BASE + NUM; i ++)
keyestudio
// set I/O pins as output
// set I/O pins as "low", turn off LEDs one by one.
// delay
www.keyestudio.cc
32

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ARDUINO maker learning kit and is the answer not in the manual?

Table of Contents