1. Test the keypad by itself
Wire the four row and four column pins. Run a small scan test or print each detected key before connecting the servo.
2. Add status feedback
Connect the green LED to GP15 through a 220 ohm resistor. Confirm it lights independently when GP15 is high.
3. Connect the servo safely
Power the servo from regulated 5 V, connect the grounds, and connect only the servo signal to GP16. Test open and closed angles before attaching a latch.
4. Run the lock program
Enter 2580 followed by #. The LED should light and the servo should unlock for three seconds. Press * to clear a partial entry.
5. Tune the mechanism
Mount the servo horn so neither locked nor unlocked position forces it against a mechanical stop. Treat this as a learning model, not a security device.