i am new at arduino and have this question:when writing a library, how do you define the use of any pins you want to use
Just like you do in a sketch. Although it is better if you don't. Make the pin to use an input, instead of hardcoding a pin number.