OtagoPolytechnic / third-year-studio-2024-rainy-arcade

third-year-studio-2024-rainy-arcades created by GitHub Classroom
1 stars 0 forks source link

RFID Token #45

Closed ramandeepkau closed 2 months ago

ramandeepkau commented 2 months ago

RFID access control system uses Arduino and an RFID reader module to manage access to the Arcade game. When an RFID card is scanned, its serial number is compared against a list of authorized card serial numbers. If the scanned card is authorized, a green LED lights up, granting access. If the card is unauthorized, a red LED lights up, denying access.

ramandeepkau commented 2 months ago

Good work. I look forward to seeing the hardware setup in person

I will drop it tomorrow to hardware room

OP-ReubenK commented 2 months ago

It identifies which card has access and which does not. the next step would be to have the unit be in a locked state with the red LED on, which would then flash when a denied card is swiped. when you swipe an allowed card, the green light should then turn on indicating the unit is unlocked, and remain unlocked until either the SAME card is swiped again, or a timeframe of no activity has passed ( 20 seconds for testing).

3 states might be needed, A default LOCKED state (RED), and UNLOCKED state (green) and a DENIED state (red LED flashes). the DENIED state should then default back to locked after a few seconds or a short number of blinks.

OP-ReubenK commented 2 months ago

this is related to issues #47, #31, #43, #46

ramandeepkau commented 2 months ago

Changes made:

  1. Introduced BUZZER_PIN to control the buzzer via a digital pin.
  2. Configured the buzzer pin as an output within the setup() function. 3/ Added deniedBeep() to produce a 200ms tone when access is denied.
  3. Added grantedBeep() for a short, double-tone signal when access is granted.
  4. Incorporated calls to both deniedBeep() and grantedBeep() in the appropriate cases within the updateState() function.
  5. Implemented Serial.println("Access granted."); and Serial.println("Access denied."); in the updateState() function to send.
  6. Feedback to the serial monitor alongside LED and buzzer notifications.

These updates are crucial for situations where visual confirmation is insufficient. The buzzer sounds distinctly for granted or denied access, while the serial monitor prints out the status, making it beneficial for debugging and user interaction logging.

ramandeepkau commented 2 months ago

Achieved the requirements requested.