{"action":"created","comment":{"url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/comments/33650971","id":33650971,"diff_hunk":"@@ -196,3 +196,56 @@ Blockly.Blocks['serial_print'] = {\n     this.setTooltip('Prints data to the console/serial port as human-readable ASCII text.');\n   }\n };\n+\n+Blockly.Blocks['lcd_setup'] = {\n+  init:function(){\n+    this.setColour (257);\n+    this.appendDummyInput(\"\")\n+    .appendField(\"Setup LCD\")\n+    .appendField(new Blockly.FieldImage(\"https://c1.staticflickr.com/9/8305/7804378078_4cca315e83.jpg\", 64, 64))\n+    .appendField(\"RS PIN#\")\n+    .appendField(new Blockly.FieldDropdown(profile.default.digital), \"RS_PIN\")\n+    .appendField(\"ENABLE PIN#\")\n+    .appendField(new Blockly.FieldDropdown(profile.default.digital), \"ENABLE_PIN\")\n+    .appendField(\"D4 PIN#\")\n+    .appendField(new Blockly.FieldDropdown(profile.default.digital), \"D4_PIN\")\n+    .appendField(\"D5 PIN#\")\n+    .appendField(new Blockly.FieldDropdown(profile.default.digital), \"D5_PIN\")\n+    .appendField(\"D6 PIN#\")\n+    .appendField(new Blockly.FieldDropdown(profile.default.digital), \"D6_PIN\")\n+    .appendField(\"D7 PIN#\")\n+    .appendField(new Blockly.FieldDropdown(profile.default.digital), \"D7_PIN\");\n+  this.setPreviousStatement(true,null);\n+  this.setNextStatement(true,null);\n+  this.setTooltip('Turns on the LCD');\n+  }\n+};\n+\n+Blockly.Blocks['lcd_print'] = {\n+  init:function(){\n+    this.setColour (257);\n+    this.appendDummyInput(\"\")\n+    .appendField(\"LCD Print\")\n+    .appendField(\"Cursor Column #: \")\n+    .appendField(new Blockly.FieldDropdown([[\"1\", \"0\"], [\"2\", \"1\"], [\"3\", \"2\"], [\"4\", \"3\"], [\"5\", \"4\"], [\"6\", \"5\"], [\"7\", \"6\"], [\"8\", \"7\"], [\"9\", \"8\"], [\"10\", \"9\"], [\"11\", \"10\"], [\"12\", \"11\"],[\"13\", \"12\"],[\"14\", \"13\"],[\"15\", \"14\"],[\"16\", \"15\"]]), \"CURSOR_COLUMN#\")","path":"blockly/blocks/base.js","position":35,"original_position":35,"commit_id":"45c86eced6f5ad0aa6d16148e92eb7d4cfa68854","original_commit_id":"45c86eced6f5ad0aa6d16148e92eb7d4cfa68854","user":{"login":"Arachnid","id":17865,"avatar_url":"https://avatars.githubusercontent.com/u/17865?v=3","gravatar_id":"","url":"https://api.github.com/users/Arachnid","html_url":"https://github.com/Arachnid","followers_url":"https://api.github.com/users/Arachnid/followers","following_url":"https://api.github.com/users/Arachnid/following{/other_user}","gists_url":"https://api.github.com/users/Arachnid/gists{/gist_id}","starred_url":"https://api.github.com/users/Arachnid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arachnid/subscriptions","organizations_url":"https://api.github.com/users/Arachnid/orgs","repos_url":"https://api.github.com/users/Arachnid/repos","events_url":"https://api.github.com/users/Arachnid/events{/privacy}","received_events_url":"https://api.github.com/users/Arachnid/received_events","type":"User","site_admin":false},"body":"You could do that, but you could also just generate it in-place in this function:\r\ncolumns = [];\r\nfor(i = 0; i < 16; i++) columns.append([(i + 1).toString(), i.toString()]);","created_at":"2015-07-01T06:10:04Z","updated_at":"2015-07-01T06:10:04Z","html_url":"https://github.com/gasolin/BlocklyDuino/pull/40#discussion_r33650971","pull_request_url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/comments/33650971"},"html":{"href":"https://github.com/gasolin/BlocklyDuino/pull/40#discussion_r33650971"},"pull_request":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40","id":38824604,"html_url":"https://github.com/gasolin/BlocklyDuino/pull/40","diff_url":"https://github.com/gasolin/BlocklyDuino/pull/40.diff","patch_url":"https://github.com/gasolin/BlocklyDuino/pull/40.patch","issue_url":"https://api.github.com/repos/gasolin/BlocklyDuino/issues/40","number":40,"state":"open","locked":false,"title":"Serial Print, LCD support, and while loop","user":{"login":"stevoleeto","id":8977732,"avatar_url":"https://avatars.githubusercontent.com/u/8977732?v=3","gravatar_id":"","url":"https://api.github.com/users/stevoleeto","html_url":"https://github.com/stevoleeto","followers_url":"https://api.github.com/users/stevoleeto/followers","following_url":"https://api.github.com/users/stevoleeto/following{/other_user}","gists_url":"https://api.github.com/users/stevoleeto/gists{/gist_id}","starred_url":"https://api.github.com/users/stevoleeto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevoleeto/subscriptions","organizations_url":"https://api.github.com/users/stevoleeto/orgs","repos_url":"https://api.github.com/users/stevoleeto/repos","events_url":"https://api.github.com/users/stevoleeto/events{/privacy}","received_events_url":"https://api.github.com/users/stevoleeto/received_events","type":"User","site_admin":false},"body":"This branch includes the following changes from the master branch:\r\n\r\n- New Serial.print which prints to the NEXT line instead of tabbing to the right. This is much easier to read and is more intuitive to the average user.\r\n\r\n- LCD support for LCD's such as: https://www.sparkfun.com/products/709. These LCD's are common in most beginner's kits, and are widely used. This includes three new blocks; Setup, Print, and Clear.\r\n\r\n- While Loop. A block for creating a while loop. ","created_at":"2015-06-29T22:26:00Z","updated_at":"2015-07-01T06:10:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e68e345b71fd8346b800870f8abe9cf7596b945","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40/commits","review_comments_url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40/comments","review_comment_url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gasolin/BlocklyDuino/issues/40/comments","statuses_url":"https://api.github.com/repos/gasolin/BlocklyDuino/statuses/45c86eced6f5ad0aa6d16148e92eb7d4cfa68854","head":{"label":"stevoleeto:branchToPR","ref":"branchToPR","sha":"45c86eced6f5ad0aa6d16148e92eb7d4cfa68854","user":{"login":"stevoleeto","id":8977732,"avatar_url":"https://avatars.githubusercontent.com/u/8977732?v=3","gravatar_id":"","url":"https://api.github.com/users/stevoleeto","html_url":"https://github.com/stevoleeto","followers_url":"https://api.github.com/users/stevoleeto/followers","following_url":"https://api.github.com/users/stevoleeto/following{/other_user}","gists_url":"https://api.github.com/users/stevoleeto/gists{/gist_id}","starred_url":"https://api.github.com/users/stevoleeto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevoleeto/subscriptions","organizations_url":"https://api.github.com/users/stevoleeto/orgs","repos_url":"https://api.github.com/users/stevoleeto/repos","events_url":"https://api.github.com/users/stevoleeto/events{/privacy}","received_events_url":"https://api.github.com/users/stevoleeto/received_events","type":"User","site_admin":false},"repo":{"id":38169578,"name":"BlocklyDuino","full_name":"stevoleeto/BlocklyDuino","owner":{"login":"stevoleeto","id":8977732,"avatar_url":"https://avatars.githubusercontent.com/u/8977732?v=3","gravatar_id":"","url":"https://api.github.com/users/stevoleeto","html_url":"https://github.com/stevoleeto","followers_url":"https://api.github.com/users/stevoleeto/followers","following_url":"https://api.github.com/users/stevoleeto/following{/other_user}","gists_url":"https://api.github.com/users/stevoleeto/gists{/gist_id}","starred_url":"https://api.github.com/users/stevoleeto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevoleeto/subscriptions","organizations_url":"https://api.github.com/users/stevoleeto/orgs","repos_url":"https://api.github.com/users/stevoleeto/repos","events_url":"https://api.github.com/users/stevoleeto/events{/privacy}","received_events_url":"https://api.github.com/users/stevoleeto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevoleeto/BlocklyDuino","description":"BlocklyDuino is a web-based visual programming editor for arduino.","fork":true,"url":"https://api.github.com/repos/stevoleeto/BlocklyDuino","forks_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/forks","keys_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/teams","hooks_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/hooks","issue_events_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/issues/events{/number}","events_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/events","assignees_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/assignees{/user}","branches_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/branches{/branch}","tags_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/tags","blobs_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/statuses/{sha}","languages_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/languages","stargazers_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/stargazers","contributors_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/contributors","subscribers_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/subscribers","subscription_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/subscription","commits_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/contents/{+path}","compare_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/merges","archive_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/downloads","issues_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/issues{/number}","pulls_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/pulls{/number}","milestones_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/milestones{/number}","notifications_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/labels{/name}","releases_url":"https://api.github.com/repos/stevoleeto/BlocklyDuino/releases{/id}","created_at":"2015-06-27T17:51:59Z","updated_at":"2015-06-27T17:52:01Z","pushed_at":"2015-06-29T22:22:08Z","git_url":"git://github.com/stevoleeto/BlocklyDuino.git","ssh_url":"git@github.com:stevoleeto/BlocklyDuino.git","clone_url":"https://github.com/stevoleeto/BlocklyDuino.git","svn_url":"https://github.com/stevoleeto/BlocklyDuino","homepage":null,"size":2110,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"gasolin:master","ref":"master","sha":"697bc39e6a05d3816b43c537c3920e421ae4fee4","user":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"repo":{"id":6190813,"name":"BlocklyDuino","full_name":"gasolin/BlocklyDuino","owner":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gasolin/BlocklyDuino","description":"BlocklyDuino is a web-based visual programming editor for arduino.","fork":false,"url":"https://api.github.com/repos/gasolin/BlocklyDuino","forks_url":"https://api.github.com/repos/gasolin/BlocklyDuino/forks","keys_url":"https://api.github.com/repos/gasolin/BlocklyDuino/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gasolin/BlocklyDuino/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gasolin/BlocklyDuino/teams","hooks_url":"https://api.github.com/repos/gasolin/BlocklyDuino/hooks","issue_events_url":"https://api.github.com/repos/gasolin/BlocklyDuino/issues/events{/number}","events_url":"https://api.github.com/repos/gasolin/BlocklyDuino/events","assignees_url":"https://api.github.com/repos/gasolin/BlocklyDuino/assignees{/user}","branches_url":"https://api.github.com/repos/gasolin/BlocklyDuino/branches{/branch}","tags_url":"https://api.github.com/repos/gasolin/BlocklyDuino/tags","blobs_url":"https://api.github.com/repos/gasolin/BlocklyDuino/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gasolin/BlocklyDuino/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gasolin/BlocklyDuino/git/refs{/sha}","trees_url":"https://api.github.com/repos/gasolin/BlocklyDuino/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gasolin/BlocklyDuino/statuses/{sha}","languages_url":"https://api.github.com/repos/gasolin/BlocklyDuino/languages","stargazers_url":"https://api.github.com/repos/gasolin/BlocklyDuino/stargazers","contributors_url":"https://api.github.com/repos/gasolin/BlocklyDuino/contributors","subscribers_url":"https://api.github.com/repos/gasolin/BlocklyDuino/subscribers","subscription_url":"https://api.github.com/repos/gasolin/BlocklyDuino/subscription","commits_url":"https://api.github.com/repos/gasolin/BlocklyDuino/commits{/sha}","git_commits_url":"https://api.github.com/repos/gasolin/BlocklyDuino/git/commits{/sha}","comments_url":"https://api.github.com/repos/gasolin/BlocklyDuino/comments{/number}","issue_comment_url":"https://api.github.com/repos/gasolin/BlocklyDuino/issues/comments{/number}","contents_url":"https://api.github.com/repos/gasolin/BlocklyDuino/contents/{+path}","compare_url":"https://api.github.com/repos/gasolin/BlocklyDuino/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gasolin/BlocklyDuino/merges","archive_url":"https://api.github.com/repos/gasolin/BlocklyDuino/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gasolin/BlocklyDuino/downloads","issues_url":"https://api.github.com/repos/gasolin/BlocklyDuino/issues{/number}","pulls_url":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls{/number}","milestones_url":"https://api.github.com/repos/gasolin/BlocklyDuino/milestones{/number}","notifications_url":"https://api.github.com/repos/gasolin/BlocklyDuino/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gasolin/BlocklyDuino/labels{/name}","releases_url":"https://api.github.com/repos/gasolin/BlocklyDuino/releases{/id}","created_at":"2012-10-12T13:48:09Z","updated_at":"2015-06-30T19:30:59Z","pushed_at":"2015-06-29T22:26:00Z","git_url":"git://github.com/gasolin/BlocklyDuino.git","ssh_url":"git@github.com:gasolin/BlocklyDuino.git","clone_url":"https://github.com/gasolin/BlocklyDuino.git","svn_url":"https://github.com/gasolin/BlocklyDuino","homepage":null,"size":7227,"stargazers_count":133,"watchers_count":133,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":84,"mirror_url":null,"open_issues_count":13,"forks":84,"open_issues":13,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40"},"html":{"href":"https://github.com/gasolin/BlocklyDuino/pull/40"},"issue":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/issues/40"},"comments":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/gasolin/BlocklyDuino/statuses/45c86eced6f5ad0aa6d16148e92eb7d4cfa68854"}}}}