functions to use gpio pins