Using analog pins as digital on Leonardo

That is the proper way to do it.