Code to test analog ports