Introduction: PassPen (Arduino Password Manager)

This is my PassPen project. a small arduino nano that loggs me in to the computers at school.

It's made with a small PCB i designed with buttons to have a pin to allow locking before printing passwords.

Step 1: Get the Code.


Arduino pro micro:

Micro Usb adapter (or cable will work).

The code and PCB design can be found here:

for Arduino pro micro use the PasscodeBoard.ino file, and for the digispark board use the DigiSpark_passcode.ino file.

Step 2: Wiring. (will Be Added Shortly)

you may choose what inputs you want to use. my design uses input 2,3 and 4.

Step 3: Change to Your Liking.

Change the all the const int btnX, to the pin values you use if your not using the same as i am with my board.


const int btn1=10; // This sets button one to digital input 10.

The code for the Arduino is written to evaluate the the the PIN_CODE[] arrray.

so add the desired pin between the {} - brackets, it can be nearly as long as you want, the code is dynamic in that sense.


int PIN_CODE[]={1,2,3,3,1};

then add the passwords or other buttons you want to insert in the switch case "switch(btn_number())"

under case 1 is the stuff that will be printed when button 1 is pressed, and so on.

do not remove the break; at the end of each case.(i'm saying this in case you don't know how a switch-case works.



case 1: // Types UserName then tabbs to the next field, types Password1 then hits Enter.



case 2: // Types Password2



case 3: // Types Password3, then hits Enter.



Keyboard.println("Something went wrong, and none of the buttons where detected.");

Step 4: Write to the Arduino.

I assume you have set up your Arduino IDE with the necessary packages for the Arduino Pro Micro.

But you must add the Keyboard.h library.
open the arduino Library manager, and search for Keyboard, select the one named Keyboard, and install it.

Close the library manager when you have finished installing.

(make sure your arduino board is connected and selected in the tools menu.)
Click the write button, and you sould be done!