Skip to content

draeve/PySafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PySafe

Default password: hello

PySafe is a highly customizeable and beginner-friendly Arduino enabled smart-safe that communicates with Python for authentification via the serial interface.

Arduino code:

  • Communicates with serial interface and carries out the following instructions:
    • 'unlock' -> 0 degrees (parallel to lid)
    • 'lock' -> 90 degrees (perpendicular to lid)

Python code:

The UI consists of 3 main pages.

Menu

  • Input the password -> compares the inputted password against the master password -> gives/declines authorization
  • What can be worked on: clear password input upon entering so the user could try again without having to run the program again

  • Lock/Unlock
    • Uses pyserial to communicate with the port where the Arduino is plugged into.
    • Self explanatory - click 'Lock PySafe' to lock, and 'Unlock PySafe' to unlock

  • Reset Password
    • Takes input for the new password and writes it to the password.key file.
    • What can be worked on: Implement hashing (attempted to but came across problems with byte/string/hash conversions) for security

Things to note when using pyserial and/or working with Arduino and Python:

When a serial port is initialized, the Arduino automatically reboots itself. This means that it can't receive and execute instructions right away. If you want to write something to it immediately after initializing the serial, make sure to sleep/delay for 2 seconds first.

Looking to customize it?

Make sure to change the port value within the code accordingly! You can check which port your Arduino is using by going into Device Manager > Ports.

About

Safe made using Arduino and Pygame.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published