/* This code was written for the Stitch the Loop e-textiles curriculum by the Exploring Computer Science e-textiles team. ECS 2018 GPL V3 for non commercial use. ECS 2018 CC- BY NC SA. */ /* ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇ This program is an EXAMPLE of the many possible solutions. This code will compile as is. ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇ */ /* STUDENT META HERE STUDENT NAME(S) Date Written Brief description of what program does here. */ // The first section is where to declare global objects and call up additional files the program needs to use. /*NAMING SECTION: We name things to keep track of them easily. What will you name your other lights? */ int led1 = 10; void setup() { // The second section is for things that only need to be done once at the beginning of the program. pinMode(led1, OUTPUT); } /*ACTIVITY SECTION: This is one big loop. Whatever you put in here will run over and over and over again. */ void loop() { /* The third section is for things that happen repeatedly in the program loop while the program is running. The code is executed in the order coded. */ digitalWrite(led1, HIGH); //Turn the light on delay(1000); //waits for 1 second (1000 milliseconds) digitalWrite(led1, LOW); //Turn the light off delay(1000); //waits for 1 second } // The fourth section is for functions that are called up by the third section.