Dear forum: I've run out of Digital pins in my project. Can I use Analog pins for a digital inputs? For something like a push button or a toggle switch. I assume yes, but please tell me if there is something I should be aware of. Thanks!

Yes: set a threshold at about half the full range. You'll most definitely need an external pull-up (or down) resistor.

Great, thanks a lot!

5 days later