Study Timer Lamp

SRJT07201

Jugadu was walking in the park along with his friend Rahul. He learns that Rahul is preparing for a competitive exam, in which there is a time limit for every question. Rahul will get only 2 mins to answer the questions. The problem that Rahul is facing is that he is unable to keep the track of time. Rahul wants some help from Jugadu. Jugadu also observes that Rahul need to study on a table and he need to switch off the lights of the room?

.

Bag Items:

  1. Arduino UNO UNO
  2. LEDs
  3. Jumper cables
  4. Straws
  5. Foam Sheets
  6. Glue gun
  7. A4 size papers
  8. Cutter
  9. Glue gun
  10. PC/ Laptop
  11. 9V Battery
  12. Battery Connector

"

We need an automated timer which should be easy to reset and a table lamp. We can use Arduino UNO and LEDs to make a table lamp. The table lamp should switch on for 2 mins after every reset. Since we have reset button in Arduino UNO we can use it serve our needs. “ A lamp with 2 min timer”

    void setup() {
// put your setup code here, to run once:
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
for (int j=0;j<3; j++){
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
delay(1000);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
delay(1000);}
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
delay(60000);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
delay(1000);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
delay(60000);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
int i;
for(i=1; i>0 ; i++){
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
delay(1000);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
delay(1000);
}
}