{"action":"opened","issue":{"url":"https://api.github.com/repos/GabrielBeltrame/arduino/issues/2","repository_url":"https://api.github.com/repos/GabrielBeltrame/arduino","labels_url":"https://api.github.com/repos/GabrielBeltrame/arduino/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/GabrielBeltrame/arduino/issues/2/comments","events_url":"https://api.github.com/repos/GabrielBeltrame/arduino/issues/2/events","html_url":"https://github.com/GabrielBeltrame/arduino/issues/2","id":181177990,"number":2,"title":"PIR Code","user":{"login":"GabrielBeltrame","id":11336525,"avatar_url":"https://avatars.githubusercontent.com/u/11336525?v=3","gravatar_id":"","url":"https://api.github.com/users/GabrielBeltrame","html_url":"https://github.com/GabrielBeltrame","followers_url":"https://api.github.com/users/GabrielBeltrame/followers","following_url":"https://api.github.com/users/GabrielBeltrame/following{/other_user}","gists_url":"https://api.github.com/users/GabrielBeltrame/gists{/gist_id}","starred_url":"https://api.github.com/users/GabrielBeltrame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GabrielBeltrame/subscriptions","organizations_url":"https://api.github.com/users/GabrielBeltrame/orgs","repos_url":"https://api.github.com/users/GabrielBeltrame/repos","events_url":"https://api.github.com/users/GabrielBeltrame/events{/privacy}","received_events_url":"https://api.github.com/users/GabrielBeltrame/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T14:53:38Z","updated_at":"2016-10-05T14:53:38Z","closed_at":null,"body":"const int sensorpir = 4;\r\nconst int gnd = 3;\r\nconst int vcc = 5;\r\nint contador = 0;\r\n\r\nvoid setup() {\r\n  pinMode(gnd, OUTPUT);\r\n  pinMode(vcc, OUTPUT);\r\n  pinMode(sensorpir, INPUT);\r\n  digitalWrite(gnd, LOW);\r\n  digitalWrite(sensorpir, LOW);\r\n  digitalWrite(vcc, HIGH);\r\n  Serial.begin(9600);\r\n}\r\n\r\nvoid loop() {\r\n  int valorlido = digitalRead(sensorpir);\r\n\r\n  if(valorlido == HIGH)\r\n  {\r\n    Serial.print(\"ovimento detectado: \");\r\n    Serial.println(contador);\r\n    contador++;\r\n  }\r\n  delay(100);\r\n}"}}
{"actor":{"display_login":"GabrielBeltrame"}}