{"action":"created","issue":{"url":"https://api.github.com/repos/theoctal/octalbonescript/issues/37","labels_url":"https://api.github.com/repos/theoctal/octalbonescript/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/theoctal/octalbonescript/issues/37/comments","events_url":"https://api.github.com/repos/theoctal/octalbonescript/issues/37/events","html_url":"https://github.com/theoctal/octalbonescript/issues/37","id":72094959,"number":37,"title":"attachInterrupt mode issue","user":{"login":"xavierzip","id":2385917,"avatar_url":"https://avatars.githubusercontent.com/u/2385917?v=3","gravatar_id":"","url":"https://api.github.com/users/xavierzip","html_url":"https://github.com/xavierzip","followers_url":"https://api.github.com/users/xavierzip/followers","following_url":"https://api.github.com/users/xavierzip/following{/other_user}","gists_url":"https://api.github.com/users/xavierzip/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierzip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierzip/subscriptions","organizations_url":"https://api.github.com/users/xavierzip/orgs","repos_url":"https://api.github.com/users/xavierzip/repos","events_url":"https://api.github.com/users/xavierzip/events{/privacy}","received_events_url":"https://api.github.com/users/xavierzip/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-30T08:10:52Z","updated_at":"2015-06-22T17:44:38Z","closed_at":"2015-06-22T17:44:38Z","body":"I have been testing the library and encountered an issue when attaching an interrupt to an input. Here is my testing code \r\n\r\n```javascript\r\nvar bone = require('octalbonescript');\r\n\r\nvar pin = 'P9_15';\r\n\r\nbone.pinMode(pin, bone.INPUT_PULLUP, function(pinModeerr, pin){\r\n\tif (pinModeerr){\r\n\t\tconsole.error(pinModeerr.message); //output any error\r\n\t\treturn;\r\n\t}else{\r\n\t\tconsole.log(pin+' initialized');\r\n\t\tbone.attachInterrupt(pin, bone.CHANGE, function(atItrperror, resp){\r\n\t\t\tif(attItrerr){\r\n\t\t\t\tconsole.log(attItrerr.message);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}, function(attItrerr){\r\n\t\t\tif(attItrerr){\r\n\t\t\t\tconsole.log(attItrerr.message);\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tconsole.log(pin+' attached to interrupt');\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n})\r\n```\r\nAnd I got error:\r\nattachInterrupt: mode must be \"rising\", \"falling\" or \"both\". Invalid mode argument\r\nattachInterrupt: mode must be \"rising\", \"falling\" or \"both\". Invalid mode argument\r\n\r\nAny idea what is happening? Many thanks in advance!\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/theoctal/octalbonescript/issues/comments/114194934","html_url":"https://github.com/theoctal/octalbonescript/issues/37#issuecomment-114194934","issue_url":"https://api.github.com/repos/theoctal/octalbonescript/issues/37","id":114194934,"user":{"login":"adityapatadia","id":1086617,"avatar_url":"https://avatars.githubusercontent.com/u/1086617?v=3","gravatar_id":"","url":"https://api.github.com/users/adityapatadia","html_url":"https://github.com/adityapatadia","followers_url":"https://api.github.com/users/adityapatadia/followers","following_url":"https://api.github.com/users/adityapatadia/following{/other_user}","gists_url":"https://api.github.com/users/adityapatadia/gists{/gist_id}","starred_url":"https://api.github.com/users/adityapatadia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityapatadia/subscriptions","organizations_url":"https://api.github.com/users/adityapatadia/orgs","repos_url":"https://api.github.com/users/adityapatadia/repos","events_url":"https://api.github.com/users/adityapatadia/events{/privacy}","received_events_url":"https://api.github.com/users/adityapatadia/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T17:44:38Z","updated_at":"2015-06-22T17:44:38Z","body":"I am sorry, the code you wrote first was perfect. There was actually a bug in library. It is fixed in v1.0.2.\r\nYou should use ```bone.CHANGE``` only."}}