Super Simple Secret Switch
I programmed my board to detect a secret knock, and then alternate the state of the LED! This lets me exchange very simple covert messages with my roommates that are protected from being changed.
Here's the design
Here the completed pcb.
Don't tell anyone, but here is the password
Snags along the way
Initially my programming ribbon cable was backawards! This was a bit frustrating, and errors where not very clear. Ultimately with the help of David Mellis and Matt Miller's extra cable, I was able to get things working.
I had some trouble milling on the Arch lab modela. Here's a picture of my traces, and you can see how some are a bit too skiny. To work around the problems on the arch lab modella, I ensured that allt races where 16 mils and that there were no 45 degree ends. Some traces also did not get cut all of the way, likely because my PNG was not high enough resolution.
Right now knock detection is a bit simple. It waits for a button press and an unpress (must happen in 50 ms), pauses for a specific number of miliseconds, then checks for a button press again within 50 ms. Then it continues on repeating this pattern. Here's a sample of the code..
A more complex knock detector would keep a recent know history with the delays between each presses, and then match that history for patterns. This would enable knocks that had the timing correct relative to itself, rather than absolute.