I plan to use the Trinket Pro and a Display to generate time-based one-time passwords (TOTP) like Google Authenticator does.
I use two factor authentication wherever possible and I don't want to depend on my phones battery to access my online accounts. So I came up with the idea to make a hardware gadget that replaces the Authenticator app.
I've ordered an 128x64px OLED display to display additional information like account identifier and a real-time clock module but in the meantime an old 16x2 character LCD will do.
So, yesterday I've played around with damico's Arduino-OATH-Token (https://github.com/damico/ARDUINO-OATH-TOKEN) so I can use his code with my own timer bar. There was also just a small edit necessary to make the algorithm work with the code I've got from google since it was two bytes longer than the authenticator expected.
As you can see in the picture above, the codes of the Trinket and Google Authenticator match.
After this was done I wanted something nicer than some components plugged into a breadboard so I made a prototype for the hardware design. It is big enough to fit the components side by side and theoretically a battery pack and even though the final device is planned to be much smaller, the current version will still fit into my jeans pocket.
Because the authenticator is supposed to handle multiple accounts in the future I needed some kind of menu controls. Since the I2C OLED display I've ordered hasn't been delivered yet and the one I currently use needs almost all of the pins and I still need 2 for the I2C RTC module (which didn't arrive yet either), I didn't have enough pins left to connect all five button I wanted.
To work around this I connected all the buttons via a voltage divider with different resistors per button to one analog input and differentiate them by their specific voltage drop.
Below you'll see the circuit diagram for the buttons and the current hardware protoype.
Now I have to continue working on the code to implement a menu and multi account support.