Maybe here? http://webzone.k3.mah.se/projects/arduino-workshop/projects/arduino_meets_processing/arduino-files/ap_ReadDigital/ap_ReadDigital.pde