{"action":"created","issue":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/128","labels_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/128/comments","events_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/128/events","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/128","id":55413504,"number":128,"title":"Not reliable gpio timing","user":{"login":"dvv","id":211335,"avatar_url":"https://avatars.githubusercontent.com/u/211335?v=3","gravatar_id":"","url":"https://api.github.com/users/dvv","html_url":"https://github.com/dvv","followers_url":"https://api.github.com/users/dvv/followers","following_url":"https://api.github.com/users/dvv/following{/other_user}","gists_url":"https://api.github.com/users/dvv/gists{/gist_id}","starred_url":"https://api.github.com/users/dvv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvv/subscriptions","organizations_url":"https://api.github.com/users/dvv/orgs","repos_url":"https://api.github.com/users/dvv/repos","events_url":"https://api.github.com/users/dvv/events{/privacy}","received_events_url":"https://api.github.com/users/dvv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-25T12:26:51Z","updated_at":"2015-01-25T15:46:24Z","closed_at":"2015-01-25T15:46:24Z","body":"This code\r\n```lua\r\nfunction meandr()\r\n  local gpio = gpio\r\n  local mode, write = gpio.mode, gpio.write\r\n  local pin = 3\r\n  mode(pin, gpio.OUTPUT)\r\n  while true do\r\n    write(pin, 1)\r\n    write(pin, 0)\r\n  end\r\n  mode(pin, gpio.INPUT)\r\nend\r\n```\r\nproduces the following waveform\r\n\r\n![image](https://cloud.githubusercontent.com/assets/211335/5891415/5086ddfc-a4a5-11e4-8284-fe6f3a22fe78.png)\r\n\r\nwhile one would expect less variance.\r\n\r\nThe high pulses are of 8,67us which gives us circa 60Khz at the best conditions. Wonder if the same holds being rewritten in pure C."},"comment":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/comments/71378022","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/128#issuecomment-71378022","issue_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/128","id":71378022,"user":{"login":"dvv","id":211335,"avatar_url":"https://avatars.githubusercontent.com/u/211335?v=3","gravatar_id":"","url":"https://api.github.com/users/dvv","html_url":"https://github.com/dvv","followers_url":"https://api.github.com/users/dvv/followers","following_url":"https://api.github.com/users/dvv/following{/other_user}","gists_url":"https://api.github.com/users/dvv/gists{/gist_id}","starred_url":"https://api.github.com/users/dvv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvv/subscriptions","organizations_url":"https://api.github.com/users/dvv/orgs","repos_url":"https://api.github.com/users/dvv/repos","events_url":"https://api.github.com/users/dvv/events{/privacy}","received_events_url":"https://api.github.com/users/dvv/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T15:46:24Z","updated_at":"2015-01-25T15:46:24Z","body":"NVM, this works ok on another module.\r\nI did this test because the most freq in `pwm` is only 1kHz. Wanted to use `pwm` to blink the diode of wirelessly controlled 38kHz IR remote )"}}