eReR98 / QR-Capture-Code

0 stars 0 forks source link

Implement door control via servo #5

Closed eReR98 closed 1 month ago

eReR98 commented 1 month ago

Most of the work here was hardware related. Security system can now control a servo motor (which is a placeholder for a door lock). It compares the QR code to a list of trusted users/passwords. If the user is found, a welcome message is printed that includes the user's name and the door lock is released. If not, the user is notified that their access is denied.

Relevant commit here. Buildroot repo not modified for this issue.

DoD:

The servo can now move 180 degrees using pigpio. Below is a before image of the full system. The servo is powered by 3 AA batteries with the ground connected to the pi. The control pin is connected to GPIO 12 on the pi. The green light on the camera indicates that it is currently capturing images

Image

Below is the system after scanning a valid QR code (the servo has moved 180 degrees). Camera is not visible because it was moved to scan the QR code.

Image

Below is one of the authorized QR codes

Image

The previous images somewhat verify this already, but here is a terminal screenshot from a test. It shows the output for both an authorized and non-authorized QR code. For authorized users, the door is opened and shut with corresponding prints to the terminal output. If the decoded password is not valid, it just prints out "User not authorized"

Image

ORIGINAL COMMENT Control a servo to open/close door lock depending on whether a valid QR code was detected or not

DoD:

Blockers:

eReR98 commented 1 month ago

Code has started. Since both the LCD and servo require GPIO pins there will likely be some overlap in development