Si tu es un peu anglophone : http://arduino.cc/en/Hacking/LibraryTutorial
Il y a toutes les réponses à tes questions