Sebastian Felix Schwarz
Published © MIT

26 Seconds to be safe #corona #covid19

To contain the spread of the corona virus it takes 26 seconds of hand washing to eliminate the pathogen, according to the WHO.

BeginnerFull instructions provided30 minutes474
26 Seconds to be safe #corona #covid19

Things used in this project

Hardware components

thingSoC ESP32 WiFi Module
thingSoC ESP32 WiFi Module
×1
IR Transceiver (Generic)
×1
RGB Diffused Common Cathode
RGB Diffused Common Cathode
×1

Story

Read more

Schematics

Sketch.fzz

Wire

Code

handwasch timer

C/C++
const int IR = 26;
const int blue=18;
const int green=19;
const int red=21;

void setup() 
{
pinMode(IR,INPUT);  //IR sensor
pinMode(blue,OUTPUT); //RED
pinMode(green,OUTPUT); //GREEN
pinMode(red,OUTPUT); //BLUE
Serial.begin(9600);
  digitalWrite(blue,LOW); //RED off
  digitalWrite(green,LOW); //GREEN on by default
  digitalWrite(red,LOW); //BLUE off
}

void loop() 
{
  int a= digitalRead(IR);
  delay(100);
  if(a==0)
   { 
    digitalWrite(blue,HIGH); //RED off
    digitalWrite(green,LOW); //GREEN on by default
    digitalWrite(red,LOW); //BLUE off
            
       for(int i=0; i<20; i++)
         {
            digitalWrite(blue,HIGH);
            delay(1000);
         }  
     digitalWrite(blue,LOW);
     digitalWrite(green,HIGH);
     delay(3000);
     digitalWrite(green,LOW);
     digitalWrite(red,HIGH);
     delay(300);
     digitalWrite(red,LOW);
     delay(300);
     digitalWrite(red,HIGH);
     delay(300);
     digitalWrite(red,LOW);
  }

}

handwash-timer-who

Credits

Sebastian Felix Schwarz

Sebastian Felix Schwarz

3 projects • 1 follower
working for over 15y in the digital bussiness, state certified computer science assistant and Mario Kart driver on the SNES ;)

Comments