Advanced Dust Pan

SRJT08204

Sonu works as an office boy in the school of Jugaadu. Sonu works hard and finishes tasks with good efficiency. One of his work is to clean the teachers' desk. The task is to collect dust and wipe the table with the wet cloth. The complete process takes too much of his time, he wants to work in the Tinkering lab in free time. He asked Jugaadu to make a device for him to solve this issue. Can you tell us how?

Bag Items:

  1. Arduino UNO UNO
  2. USB Cable
  3. Jumper Wires
  4. Dust Pan
  5. IR sensors
  6. Clothes
  7. Servo Motor
  8. Glue gun
  9. Scissor
  10. Ice cream Sticks
  11. Battery
  12. Battery connector

"


    #include 
Servo s;
int ir=12;

void setup() {
pinMode(13,OUTPUT);
pinMode(ir,INPUT);
s.attach(11);
digitalWrite(13,HIGH);
}
void loop() {
if(!digitalRead(ir)){
for(int i=0; i<90; i++){
s.write(i);
delay(1);
}
delay(500);
for(int j=90; j>1; j--){
s.write(j);
delay(1);
}
}else{
s.write(0);
}
}