changed pin number and added debug print statements