/* 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 a starter you will need to add code. 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. int led1 = 0; //name your led pins int aluminumFoil = A11; //name your aluminum foil patch (only the one that's connected to an "A" pin) int foilStorage; //this variable stores readings from the sensor void setup() { // The second section is for things that only need to be done once at the beginning of the program. pinMode(led1, OUTPUT); //set your led pins to OUTPUT pinMode(aluminumFoil, INPUT); //sets aluminum foil patch to INPUT digitalWrite(aluminumFoil, HIGH); //initializes the sensor Serial.begin(9600); //allows you to read your sensor } 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. */ foilStorage = analogRead(aluminumFoil); //the part of your code that reads information from the sensor Serial.println(foilStorage); //prints the value of the sensor to the serial monitor delay(100); //delay for 1/10 of a second /*Write your actions here. Your sets of if/else statements for your human sensor along with which lighting patterns you want to call */ } // The fourth section is for functions that are called up by the third section. void LightingPattern1(){ //Sample function for a lighting pattern digitalWrite(led1,HIGH); delay(1000); digitalWrite(led1, LOW); delay (1000); }