Skip to main content

4.Epidemic Prevention Assistant

##Case Description

During the pandemic, to prevent overcrowding, the workflow of the electronic epidemic prevention volunteer involves detecting individuals via ultrasonic sensors. A servo motor then lowers a barrier to stop the person from moving forward until the individual ahead completes vaccination.

###Key Knowledge Points

• Master the usage of the Cat Head Ultrasonic sensor. • Master the usage of the Sugar light sensor.

##Case Implementation


Structural Assembly

Epidemic Prevention Assistant.pdf

###Circuit Connection

• Connect the Cat Head Ultrasonic sensor to the Robotbit P8 terminal block. • Connect the light sensor to the Robotbit P1 terminal block. • Connect the red LED sensor to the Robotbit P0 terminal block. • Connect the servo's 3-pin wire to the S1 port according to the corresponding colors.

###Programming Based on the light sensor value, detect whether it is currently day or night. When it is night, automatically set the RGB light to white. When a person is detected in front of the ultrasonic sensor, the servo lowers the barrier to prohibit passage. After counting down from 5, the barrier is raised again to maintain distance between people.

image.png

Program Source Files