{"action":"closed","issue":{"url":"https://api.github.com/repos/espruino/Espruino/issues/481","labels_url":"https://api.github.com/repos/espruino/Espruino/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/espruino/Espruino/issues/481/comments","events_url":"https://api.github.com/repos/espruino/Espruino/issues/481/events","html_url":"https://github.com/espruino/Espruino/issues/481","id":54958786,"number":481,"title":"Missing complement to digitalPulse","user":{"login":"AlexanderBrevig","id":721090,"avatar_url":"https://avatars.githubusercontent.com/u/721090?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderBrevig","html_url":"https://github.com/AlexanderBrevig","followers_url":"https://api.github.com/users/AlexanderBrevig/followers","following_url":"https://api.github.com/users/AlexanderBrevig/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderBrevig/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderBrevig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderBrevig/subscriptions","organizations_url":"https://api.github.com/users/AlexanderBrevig/orgs","repos_url":"https://api.github.com/users/AlexanderBrevig/repos","events_url":"https://api.github.com/users/AlexanderBrevig/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderBrevig/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-21T00:00:53Z","updated_at":"2015-01-28T08:56:14Z","closed_at":"2015-01-28T08:56:14Z","body":"A way to measure incoming pulses. \r\n\r\nMaybe something like:\r\n\r\n```c\r\ndigitalPulseIn(pin:Pin, peak:bool, timeout: ms)\r\n```\r\n\r\nSo - we'd tell the function:\r\n```\r\n- what pin to use\r\n                    __                          __   __         \r\n- to look for a   _/  \\_ (true/high) pulse or a   \\_/   (false/low)\r\n\r\n- timeout (if no such pulse is detected, bail out - default should be??)\r\n```\r\n\r\nI think it makes sense if this is a blocking operation? I.e a timeout of 500ms will worst-case block ~500ms"}}