{"action":"opened","number":97,"pull_request":{"url":"https://api.github.com/repos/jgautier/firmata/pulls/97","id":40849191,"html_url":"https://github.com/jgautier/firmata/pull/97","diff_url":"https://github.com/jgautier/firmata/pull/97.diff","patch_url":"https://github.com/jgautier/firmata/pull/97.patch","issue_url":"https://api.github.com/repos/jgautier/firmata/issues/97","number":97,"state":"open","locked":false,"title":"initial pass a Firmata serial implementation","user":{"login":"soundanalogous","id":401539,"avatar_url":"https://avatars.githubusercontent.com/u/401539?v=3","gravatar_id":"","url":"https://api.github.com/users/soundanalogous","html_url":"https://github.com/soundanalogous","followers_url":"https://api.github.com/users/soundanalogous/followers","following_url":"https://api.github.com/users/soundanalogous/following{/other_user}","gists_url":"https://api.github.com/users/soundanalogous/gists{/gist_id}","starred_url":"https://api.github.com/users/soundanalogous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundanalogous/subscriptions","organizations_url":"https://api.github.com/users/soundanalogous/orgs","repos_url":"https://api.github.com/users/soundanalogous/repos","events_url":"https://api.github.com/users/soundanalogous/events{/privacy}","received_events_url":"https://api.github.com/users/soundanalogous/received_events","type":"User","site_admin":false},"body":"Opening for discussion, nothing is set in stone yet. This is one of at least 2 ways to implement the Firmata serial protocol. The other approach would be to create a serial object with a constructor. I started with the version that fits in better with the existing patterns in firmata.js. To compare:\r\n\r\n```\r\n// the approach implemented in this PR:\r\nboard.serialConfig(0x08, 57600, 0, 10, 11);\r\nboard.serialWrite(0x08, [112, 113, 114]);\r\n\r\n// vs the alternate approach (not implemented)\r\n// where there would be a new serial.js module added to /firmata/lib/\r\nvar Serial = require(\"../lib/serial\");\r\nvar serial1 = new Serial(0x08, 57600, 0, 10, 11);\r\nserial1.write([112, 113, 114]);\r\n```\r\n\r\nI think the alternative version would be a cleaner api but perhaps a bit tricky to implement in node-firmata.","created_at":"2015-07-26T07:06:11Z","updated_at":"2015-07-26T07:06:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jgautier/firmata/pulls/97/commits","review_comments_url":"https://api.github.com/repos/jgautier/firmata/pulls/97/comments","review_comment_url":"https://api.github.com/repos/jgautier/firmata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jgautier/firmata/issues/97/comments","statuses_url":"https://api.github.com/repos/jgautier/firmata/statuses/ba83c320aec97d4db0bae913aa3932b7732c6692","head":{"label":"soundanalogous:serial","ref":"serial","sha":"ba83c320aec97d4db0bae913aa3932b7732c6692","user":{"login":"soundanalogous","id":401539,"avatar_url":"https://avatars.githubusercontent.com/u/401539?v=3","gravatar_id":"","url":"https://api.github.com/users/soundanalogous","html_url":"https://github.com/soundanalogous","followers_url":"https://api.github.com/users/soundanalogous/followers","following_url":"https://api.github.com/users/soundanalogous/following{/other_user}","gists_url":"https://api.github.com/users/soundanalogous/gists{/gist_id}","starred_url":"https://api.github.com/users/soundanalogous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundanalogous/subscriptions","organizations_url":"https://api.github.com/users/soundanalogous/orgs","repos_url":"https://api.github.com/users/soundanalogous/repos","events_url":"https://api.github.com/users/soundanalogous/events{/privacy}","received_events_url":"https://api.github.com/users/soundanalogous/received_events","type":"User","site_admin":false},"repo":{"id":22329130,"name":"firmata","full_name":"soundanalogous/firmata","owner":{"login":"soundanalogous","id":401539,"avatar_url":"https://avatars.githubusercontent.com/u/401539?v=3","gravatar_id":"","url":"https://api.github.com/users/soundanalogous","html_url":"https://github.com/soundanalogous","followers_url":"https://api.github.com/users/soundanalogous/followers","following_url":"https://api.github.com/users/soundanalogous/following{/other_user}","gists_url":"https://api.github.com/users/soundanalogous/gists{/gist_id}","starred_url":"https://api.github.com/users/soundanalogous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundanalogous/subscriptions","organizations_url":"https://api.github.com/users/soundanalogous/orgs","repos_url":"https://api.github.com/users/soundanalogous/repos","events_url":"https://api.github.com/users/soundanalogous/events{/privacy}","received_events_url":"https://api.github.com/users/soundanalogous/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soundanalogous/firmata","description":"firmata protocol implemented in javascript","fork":true,"url":"https://api.github.com/repos/soundanalogous/firmata","forks_url":"https://api.github.com/repos/soundanalogous/firmata/forks","keys_url":"https://api.github.com/repos/soundanalogous/firmata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soundanalogous/firmata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soundanalogous/firmata/teams","hooks_url":"https://api.github.com/repos/soundanalogous/firmata/hooks","issue_events_url":"https://api.github.com/repos/soundanalogous/firmata/issues/events{/number}","events_url":"https://api.github.com/repos/soundanalogous/firmata/events","assignees_url":"https://api.github.com/repos/soundanalogous/firmata/assignees{/user}","branches_url":"https://api.github.com/repos/soundanalogous/firmata/branches{/branch}","tags_url":"https://api.github.com/repos/soundanalogous/firmata/tags","blobs_url":"https://api.github.com/repos/soundanalogous/firmata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soundanalogous/firmata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soundanalogous/firmata/git/refs{/sha}","trees_url":"https://api.github.com/repos/soundanalogous/firmata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soundanalogous/firmata/statuses/{sha}","languages_url":"https://api.github.com/repos/soundanalogous/firmata/languages","stargazers_url":"https://api.github.com/repos/soundanalogous/firmata/stargazers","contributors_url":"https://api.github.com/repos/soundanalogous/firmata/contributors","subscribers_url":"https://api.github.com/repos/soundanalogous/firmata/subscribers","subscription_url":"https://api.github.com/repos/soundanalogous/firmata/subscription","commits_url":"https://api.github.com/repos/soundanalogous/firmata/commits{/sha}","git_commits_url":"https://api.github.com/repos/soundanalogous/firmata/git/commits{/sha}","comments_url":"https://api.github.com/repos/soundanalogous/firmata/comments{/number}","issue_comment_url":"https://api.github.com/repos/soundanalogous/firmata/issues/comments{/number}","contents_url":"https://api.github.com/repos/soundanalogous/firmata/contents/{+path}","compare_url":"https://api.github.com/repos/soundanalogous/firmata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soundanalogous/firmata/merges","archive_url":"https://api.github.com/repos/soundanalogous/firmata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soundanalogous/firmata/downloads","issues_url":"https://api.github.com/repos/soundanalogous/firmata/issues{/number}","pulls_url":"https://api.github.com/repos/soundanalogous/firmata/pulls{/number}","milestones_url":"https://api.github.com/repos/soundanalogous/firmata/milestones{/number}","notifications_url":"https://api.github.com/repos/soundanalogous/firmata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soundanalogous/firmata/labels{/name}","releases_url":"https://api.github.com/repos/soundanalogous/firmata/releases{/id}","created_at":"2014-07-28T03:07:14Z","updated_at":"2014-07-27T19:21:23Z","pushed_at":"2015-07-26T06:51:13Z","git_url":"git://github.com/soundanalogous/firmata.git","ssh_url":"git@github.com:soundanalogous/firmata.git","clone_url":"https://github.com/soundanalogous/firmata.git","svn_url":"https://github.com/soundanalogous/firmata","homepage":"http://jgautier.github.com/firmata/","size":420,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jgautier:master","ref":"master","sha":"3e093e43c9d9847281854e7ffc4313764a3b9486","user":{"login":"jgautier","id":326036,"avatar_url":"https://avatars.githubusercontent.com/u/326036?v=3","gravatar_id":"","url":"https://api.github.com/users/jgautier","html_url":"https://github.com/jgautier","followers_url":"https://api.github.com/users/jgautier/followers","following_url":"https://api.github.com/users/jgautier/following{/other_user}","gists_url":"https://api.github.com/users/jgautier/gists{/gist_id}","starred_url":"https://api.github.com/users/jgautier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgautier/subscriptions","organizations_url":"https://api.github.com/users/jgautier/orgs","repos_url":"https://api.github.com/users/jgautier/repos","events_url":"https://api.github.com/users/jgautier/events{/privacy}","received_events_url":"https://api.github.com/users/jgautier/received_events","type":"User","site_admin":false},"repo":{"id":1540078,"name":"firmata","full_name":"jgautier/firmata","owner":{"login":"jgautier","id":326036,"avatar_url":"https://avatars.githubusercontent.com/u/326036?v=3","gravatar_id":"","url":"https://api.github.com/users/jgautier","html_url":"https://github.com/jgautier","followers_url":"https://api.github.com/users/jgautier/followers","following_url":"https://api.github.com/users/jgautier/following{/other_user}","gists_url":"https://api.github.com/users/jgautier/gists{/gist_id}","starred_url":"https://api.github.com/users/jgautier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgautier/subscriptions","organizations_url":"https://api.github.com/users/jgautier/orgs","repos_url":"https://api.github.com/users/jgautier/repos","events_url":"https://api.github.com/users/jgautier/events{/privacy}","received_events_url":"https://api.github.com/users/jgautier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgautier/firmata","description":"firmata protocol implemented in javascript","fork":false,"url":"https://api.github.com/repos/jgautier/firmata","forks_url":"https://api.github.com/repos/jgautier/firmata/forks","keys_url":"https://api.github.com/repos/jgautier/firmata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgautier/firmata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgautier/firmata/teams","hooks_url":"https://api.github.com/repos/jgautier/firmata/hooks","issue_events_url":"https://api.github.com/repos/jgautier/firmata/issues/events{/number}","events_url":"https://api.github.com/repos/jgautier/firmata/events","assignees_url":"https://api.github.com/repos/jgautier/firmata/assignees{/user}","branches_url":"https://api.github.com/repos/jgautier/firmata/branches{/branch}","tags_url":"https://api.github.com/repos/jgautier/firmata/tags","blobs_url":"https://api.github.com/repos/jgautier/firmata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgautier/firmata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgautier/firmata/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgautier/firmata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgautier/firmata/statuses/{sha}","languages_url":"https://api.github.com/repos/jgautier/firmata/languages","stargazers_url":"https://api.github.com/repos/jgautier/firmata/stargazers","contributors_url":"https://api.github.com/repos/jgautier/firmata/contributors","subscribers_url":"https://api.github.com/repos/jgautier/firmata/subscribers","subscription_url":"https://api.github.com/repos/jgautier/firmata/subscription","commits_url":"https://api.github.com/repos/jgautier/firmata/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgautier/firmata/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgautier/firmata/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgautier/firmata/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgautier/firmata/contents/{+path}","compare_url":"https://api.github.com/repos/jgautier/firmata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgautier/firmata/merges","archive_url":"https://api.github.com/repos/jgautier/firmata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgautier/firmata/downloads","issues_url":"https://api.github.com/repos/jgautier/firmata/issues{/number}","pulls_url":"https://api.github.com/repos/jgautier/firmata/pulls{/number}","milestones_url":"https://api.github.com/repos/jgautier/firmata/milestones{/number}","notifications_url":"https://api.github.com/repos/jgautier/firmata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgautier/firmata/labels{/name}","releases_url":"https://api.github.com/repos/jgautier/firmata/releases{/id}","created_at":"2011-03-29T05:10:59Z","updated_at":"2015-07-24T12:07:47Z","pushed_at":"2015-07-26T07:06:11Z","git_url":"git://github.com/jgautier/firmata.git","ssh_url":"git@github.com:jgautier/firmata.git","clone_url":"https://github.com/jgautier/firmata.git","svn_url":"https://github.com/jgautier/firmata","homepage":"http://jgautier.github.com/firmata/","size":869,"stargazers_count":383,"watchers_count":383,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":72,"mirror_url":null,"open_issues_count":11,"forks":72,"open_issues":11,"watchers":383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jgautier/firmata/pulls/97"},"html":{"href":"https://github.com/jgautier/firmata/pull/97"},"issue":{"href":"https://api.github.com/repos/jgautier/firmata/issues/97"},"comments":{"href":"https://api.github.com/repos/jgautier/firmata/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/jgautier/firmata/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/jgautier/firmata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jgautier/firmata/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/jgautier/firmata/statuses/ba83c320aec97d4db0bae913aa3932b7732c6692"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":522,"deletions":1,"changed_files":4}}