It's been almost two years, and we are tied up with masks every day. Mask is a boring thing, but it is a lifesaver in this situation. And every day, we have to wear a mask to protect ourselves. But I'm bored of this mask that we everyday use. Why not make it a little smarter!
That's why I make this social distancing mask that can help to maintain social distancing. When a person comes near you, and the distance is less than 3 feet, the mask shows a red collared sad face. And when the distance is less than 1.5 feet, the sad😟 face blinks continuously. If no one is in the range of 3 feet, then the mask shows a smiling face😊
Making ProcedureIt uses a VL53L0x Time-of-Flight (ToF) sensor to measure the distance. VL53L0x is a low-profile laser-ranging sensor with millimeter-level accuracy. This sensor is very suitable for this project for its compact size and ranging accuracy. I use an Arduino pro mini as the brain of the project and red and green color SMD led for the facial expressions. And a 100mah mini lipo battery is powering all of this.
CodingFirst of all, I have included the Adafruit Vl53l0x library to make the sensor work. Then I define the variables for the LEDs and the sensor. And in the setup function, I initialize the sensor and set the pin mode for the LEDs as output.
Then in the loop function, I use to measure.RangeMilliMeter
command to read the distance in millimeters and uses some conditions to show different facial expressions with distance.
if (measure.RangeMilliMeter >= 500 & measure.RangeMilliMeter < 1000) {
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
delay(1000);
}
Here, if the measured distance is less than 1000mm, and if greater than or equal to 500mm, the musk shows a red SAD face.
else if (measure.RangeMilliMeter < 500) {
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
delay(50);
digitalWrite(red, HIGH);
digitalWrite(green, HIGH);
delay(50);
Here if the measured distance is less than 500mm, the red-Sad face blinks continuously as an indication of crossing extreme distance.
But if the distance is greater than 1000mm, the mask shows the green smiley face.
Videos
Comments
Please log in or sign up to comment.