/* JAGJYOT PARMAR - Feb. 3, 2023
Arduino Introduction
*/
#define pin2 2;
#define pin6 6;
//this function set's up the PIN's
void setup() {
//pinmode is the function that sets as PIN as input or output
//pin 6 will be used to make the light blink
pinMode(6, OUTPUT);
//pin 2 will used to detect if the button was pushed or not
pinMode(2, INPUT);
}
void loop()
{
// //start the program by making the light off
digitalWrite(6, HIGH);
if(digitalRead(2) == HIGH)
{
digitalWrite(6, HIGH);
delay(1000);
digitalWrite(6, LOW);
delay(1000);
}
//turn the light off after the button is released
digitalWrite(6, HIGH);
}