Introduction: Face Mask Detector => Covid Preventer!

The number 1 thing health officials want people to do during this pandemic is to wear a mask when going out to public places, but some people still turn a blind eye to the warning.

Enter ..... COVID PrevEnter!

This robot uses the Pixy2 camera to detect the mask. If the mask is found the green LED will turn on. If the mask is not found the red LED will turn on with a buzzer beep.

Supplies

Hardware

Pixy2 Camera

Arduino(I am using an Arduino nano but uno or mega will work.Other models will not work)

LED*2(Red*1 and Green*1)

220 Ohm Resistor*2

Piezo Buzzer

Breadboard

Novoo battery

Jumper wires

Cable- Micro USB to USB(for programming and power)

Software

Arduino IDE

Pixymon v2

Step 1: Train Pixy2 to Mask

Connect Pixy2 to a computer and open pixymon.

Point Pixy2 at a mask.

Go to actions-set signature 1.

Drag click to draw a box in the center of the mask.

It should show a box around the mask and in the center, it will say s=1.

Go to file-configure and select signature labels.

Type face mask into signature1 box.

It should show the same thing but it will say face mask instead of s=1.

Step 2: Connect Everything Up

First, connect the Arduino GND to Breadboard.

Next, connect LED's and Buzzer GND to GND.

After that connect LED 5V to the resistor.

Connect the green LED resistor to pin 8 and red LED to pin 9.

Connect Buzzer 5V to pin 7.

Connect pixy2 to Arduino using given cable(On the pixy2 it is keyed but on the Arduino orientation matters, if you are using an Arduino nano the cable faces inwards but if you are using uno or mega cable faces outward).

Step 3: Install Libraries

The Pixy2 uses a library to make code simpler. To install it follow these steps:

Go to the Pixy2 downloads page and download the zip library.

Open the Arduino IDE.

Click sketch-libraries-add zip library.

Find the zip file you downloaded and select it.

Step 4: Code

Upload the attached code.

Step 5: Thank You

Thank you for reading this instructable. If you like this project please vote for it in the Arduino contest.

Arduino Contest 2020

Participated in the
Arduino Contest 2020