{"action":"created","comment":{"url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/comments/44216749","id":44216749,"diff_hunk":"@@ -0,0 +1,60 @@\n+Compass\n+*******\n+\n+.. py:module:: microbit.compass\n+\n+This module lets you access the build-in electronic compass. Before using,\n+the compass should be calibrated, otherwise the readings may be wrong.\n+\n+\n+Functions\n+=========\n+\n+.. py:function:: calibrate()\n+\n+    Starts the calibration process. After this is called, the user should\n+    lay the board flat on the table and rotate it horizontally, until the\n+    process is finished.\n+\n+.. py:function:: is_calibrated()\n+\n+    Returns ``True`` if the compass has been successfully calibrated, and\n+    returns ``False`` otherwise.\n+\n+\n+.. py:function:: is_calibrating()\n+\n+    Returns ``True`` if the calibration process is in progress, and ``False``\n+    if it has finished or hasn't been started yet.\n+\n+\n+.. py:function:: clear_calibrarion()\n+\n+    Undoes the calibration, making the compass uncalibrated again.\n+\n+\n+.. py:function:: get_x()\n+\n+    Gives the reading on the ``x`` axis of the compass.\n+\n+\n+.. py:function:: get_y()\n+\n+    Gives the reading on the ``y`` axis of the compass.\n+\n+\n+.. py:function:: get_z()\n+\n+    Gives the reading on the ``z`` axis of the compass (vertical).\n+\n+\n+.. py:function:: heading()\n+\n+    Gives the compass heading, calculated from the above readings.","path":"docs/compass.rst","position":53,"original_position":53,"commit_id":"9aec40d96e5ed71dadc12ec297aa4f290f3acf01","original_commit_id":"9aec40d96e5ed71dadc12ec297aa4f290f3acf01","user":{"login":"deshipu","id":1181357,"avatar_url":"https://avatars.githubusercontent.com/u/1181357?v=3","gravatar_id":"","url":"https://api.github.com/users/deshipu","html_url":"https://github.com/deshipu","followers_url":"https://api.github.com/users/deshipu/followers","following_url":"https://api.github.com/users/deshipu/following{/other_user}","gists_url":"https://api.github.com/users/deshipu/gists{/gist_id}","starred_url":"https://api.github.com/users/deshipu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deshipu/subscriptions","organizations_url":"https://api.github.com/users/deshipu/orgs","repos_url":"https://api.github.com/users/deshipu/repos","events_url":"https://api.github.com/users/deshipu/events{/privacy}","received_events_url":"https://api.github.com/users/deshipu/received_events","type":"User","site_admin":false},"body":"Hmm, clockwise or counter-clockwise?","created_at":"2015-11-07T20:23:43Z","updated_at":"2015-11-07T20:23:43Z","html_url":"https://github.com/bbcmicrobit/micropython/pull/78#discussion_r44216749","pull_request_url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/comments/44216749"},"html":{"href":"https://github.com/bbcmicrobit/micropython/pull/78#discussion_r44216749"},"pull_request":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78","id":50039660,"html_url":"https://github.com/bbcmicrobit/micropython/pull/78","diff_url":"https://github.com/bbcmicrobit/micropython/pull/78.diff","patch_url":"https://github.com/bbcmicrobit/micropython/pull/78.patch","issue_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/78","number":78,"state":"open","locked":false,"title":"Add initial documentation for the compass","user":{"login":"deshipu","id":1181357,"avatar_url":"https://avatars.githubusercontent.com/u/1181357?v=3","gravatar_id":"","url":"https://api.github.com/users/deshipu","html_url":"https://github.com/deshipu","followers_url":"https://api.github.com/users/deshipu/followers","following_url":"https://api.github.com/users/deshipu/following{/other_user}","gists_url":"https://api.github.com/users/deshipu/gists{/gist_id}","starred_url":"https://api.github.com/users/deshipu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deshipu/subscriptions","organizations_url":"https://api.github.com/users/deshipu/orgs","repos_url":"https://api.github.com/users/deshipu/repos","events_url":"https://api.github.com/users/deshipu/events{/privacy}","received_events_url":"https://api.github.com/users/deshipu/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-07T16:44:18Z","updated_at":"2015-11-07T20:23:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4ab5554b457c224adf9a37580e12d473130d779","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78/commits","review_comments_url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78/comments","review_comment_url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/78/comments","statuses_url":"https://api.github.com/repos/bbcmicrobit/micropython/statuses/9aec40d96e5ed71dadc12ec297aa4f290f3acf01","head":{"label":"deshipu:compass-docs","ref":"compass-docs","sha":"9aec40d96e5ed71dadc12ec297aa4f290f3acf01","user":{"login":"deshipu","id":1181357,"avatar_url":"https://avatars.githubusercontent.com/u/1181357?v=3","gravatar_id":"","url":"https://api.github.com/users/deshipu","html_url":"https://github.com/deshipu","followers_url":"https://api.github.com/users/deshipu/followers","following_url":"https://api.github.com/users/deshipu/following{/other_user}","gists_url":"https://api.github.com/users/deshipu/gists{/gist_id}","starred_url":"https://api.github.com/users/deshipu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deshipu/subscriptions","organizations_url":"https://api.github.com/users/deshipu/orgs","repos_url":"https://api.github.com/users/deshipu/repos","events_url":"https://api.github.com/users/deshipu/events{/privacy}","received_events_url":"https://api.github.com/users/deshipu/received_events","type":"User","site_admin":false},"repo":{"id":44597197,"name":"micropython-1","full_name":"deshipu/micropython-1","owner":{"login":"deshipu","id":1181357,"avatar_url":"https://avatars.githubusercontent.com/u/1181357?v=3","gravatar_id":"","url":"https://api.github.com/users/deshipu","html_url":"https://github.com/deshipu","followers_url":"https://api.github.com/users/deshipu/followers","following_url":"https://api.github.com/users/deshipu/following{/other_user}","gists_url":"https://api.github.com/users/deshipu/gists{/gist_id}","starred_url":"https://api.github.com/users/deshipu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deshipu/subscriptions","organizations_url":"https://api.github.com/users/deshipu/orgs","repos_url":"https://api.github.com/users/deshipu/repos","events_url":"https://api.github.com/users/deshipu/events{/privacy}","received_events_url":"https://api.github.com/users/deshipu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deshipu/micropython-1","description":"Port of MicroPython for the BBC micro:bit","fork":true,"url":"https://api.github.com/repos/deshipu/micropython-1","forks_url":"https://api.github.com/repos/deshipu/micropython-1/forks","keys_url":"https://api.github.com/repos/deshipu/micropython-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deshipu/micropython-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deshipu/micropython-1/teams","hooks_url":"https://api.github.com/repos/deshipu/micropython-1/hooks","issue_events_url":"https://api.github.com/repos/deshipu/micropython-1/issues/events{/number}","events_url":"https://api.github.com/repos/deshipu/micropython-1/events","assignees_url":"https://api.github.com/repos/deshipu/micropython-1/assignees{/user}","branches_url":"https://api.github.com/repos/deshipu/micropython-1/branches{/branch}","tags_url":"https://api.github.com/repos/deshipu/micropython-1/tags","blobs_url":"https://api.github.com/repos/deshipu/micropython-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deshipu/micropython-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deshipu/micropython-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/deshipu/micropython-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deshipu/micropython-1/statuses/{sha}","languages_url":"https://api.github.com/repos/deshipu/micropython-1/languages","stargazers_url":"https://api.github.com/repos/deshipu/micropython-1/stargazers","contributors_url":"https://api.github.com/repos/deshipu/micropython-1/contributors","subscribers_url":"https://api.github.com/repos/deshipu/micropython-1/subscribers","subscription_url":"https://api.github.com/repos/deshipu/micropython-1/subscription","commits_url":"https://api.github.com/repos/deshipu/micropython-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/deshipu/micropython-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/deshipu/micropython-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/deshipu/micropython-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/deshipu/micropython-1/contents/{+path}","compare_url":"https://api.github.com/repos/deshipu/micropython-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deshipu/micropython-1/merges","archive_url":"https://api.github.com/repos/deshipu/micropython-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deshipu/micropython-1/downloads","issues_url":"https://api.github.com/repos/deshipu/micropython-1/issues{/number}","pulls_url":"https://api.github.com/repos/deshipu/micropython-1/pulls{/number}","milestones_url":"https://api.github.com/repos/deshipu/micropython-1/milestones{/number}","notifications_url":"https://api.github.com/repos/deshipu/micropython-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deshipu/micropython-1/labels{/name}","releases_url":"https://api.github.com/repos/deshipu/micropython-1/releases{/id}","created_at":"2015-10-20T09:52:54Z","updated_at":"2015-10-20T09:52:55Z","pushed_at":"2015-11-07T17:13:38Z","git_url":"git://github.com/deshipu/micropython-1.git","ssh_url":"git@github.com:deshipu/micropython-1.git","clone_url":"https://github.com/deshipu/micropython-1.git","svn_url":"https://github.com/deshipu/micropython-1","homepage":"","size":773,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bbcmicrobit:master","ref":"master","sha":"c7c8bbf2490ee5faf8be8733f6f7628209db3991","user":{"login":"bbcmicrobit","id":15104236,"avatar_url":"https://avatars.githubusercontent.com/u/15104236?v=3","gravatar_id":"","url":"https://api.github.com/users/bbcmicrobit","html_url":"https://github.com/bbcmicrobit","followers_url":"https://api.github.com/users/bbcmicrobit/followers","following_url":"https://api.github.com/users/bbcmicrobit/following{/other_user}","gists_url":"https://api.github.com/users/bbcmicrobit/gists{/gist_id}","starred_url":"https://api.github.com/users/bbcmicrobit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbcmicrobit/subscriptions","organizations_url":"https://api.github.com/users/bbcmicrobit/orgs","repos_url":"https://api.github.com/users/bbcmicrobit/repos","events_url":"https://api.github.com/users/bbcmicrobit/events{/privacy}","received_events_url":"https://api.github.com/users/bbcmicrobit/received_events","type":"Organization","site_admin":false},"repo":{"id":40358251,"name":"micropython","full_name":"bbcmicrobit/micropython","owner":{"login":"bbcmicrobit","id":15104236,"avatar_url":"https://avatars.githubusercontent.com/u/15104236?v=3","gravatar_id":"","url":"https://api.github.com/users/bbcmicrobit","html_url":"https://github.com/bbcmicrobit","followers_url":"https://api.github.com/users/bbcmicrobit/followers","following_url":"https://api.github.com/users/bbcmicrobit/following{/other_user}","gists_url":"https://api.github.com/users/bbcmicrobit/gists{/gist_id}","starred_url":"https://api.github.com/users/bbcmicrobit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbcmicrobit/subscriptions","organizations_url":"https://api.github.com/users/bbcmicrobit/orgs","repos_url":"https://api.github.com/users/bbcmicrobit/repos","events_url":"https://api.github.com/users/bbcmicrobit/events{/privacy}","received_events_url":"https://api.github.com/users/bbcmicrobit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bbcmicrobit/micropython","description":"Port of MicroPython for the BBC micro:bit","fork":false,"url":"https://api.github.com/repos/bbcmicrobit/micropython","forks_url":"https://api.github.com/repos/bbcmicrobit/micropython/forks","keys_url":"https://api.github.com/repos/bbcmicrobit/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbcmicrobit/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbcmicrobit/micropython/teams","hooks_url":"https://api.github.com/repos/bbcmicrobit/micropython/hooks","issue_events_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/bbcmicrobit/micropython/events","assignees_url":"https://api.github.com/repos/bbcmicrobit/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/bbcmicrobit/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/bbcmicrobit/micropython/tags","blobs_url":"https://api.github.com/repos/bbcmicrobit/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbcmicrobit/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbcmicrobit/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbcmicrobit/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbcmicrobit/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/bbcmicrobit/micropython/languages","stargazers_url":"https://api.github.com/repos/bbcmicrobit/micropython/stargazers","contributors_url":"https://api.github.com/repos/bbcmicrobit/micropython/contributors","subscribers_url":"https://api.github.com/repos/bbcmicrobit/micropython/subscribers","subscription_url":"https://api.github.com/repos/bbcmicrobit/micropython/subscription","commits_url":"https://api.github.com/repos/bbcmicrobit/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbcmicrobit/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbcmicrobit/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbcmicrobit/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/bbcmicrobit/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbcmicrobit/micropython/merges","archive_url":"https://api.github.com/repos/bbcmicrobit/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbcmicrobit/micropython/downloads","issues_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/bbcmicrobit/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/bbcmicrobit/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbcmicrobit/micropython/labels{/name}","releases_url":"https://api.github.com/repos/bbcmicrobit/micropython/releases{/id}","created_at":"2015-08-07T11:58:53Z","updated_at":"2015-11-05T13:05:25Z","pushed_at":"2015-11-07T20:00:24Z","git_url":"git://github.com/bbcmicrobit/micropython.git","ssh_url":"git@github.com:bbcmicrobit/micropython.git","clone_url":"https://github.com/bbcmicrobit/micropython.git","svn_url":"https://github.com/bbcmicrobit/micropython","homepage":"","size":12859,"stargazers_count":95,"watchers_count":95,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":30,"forks":13,"open_issues":30,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78"},"html":{"href":"https://github.com/bbcmicrobit/micropython/pull/78"},"issue":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/issues/78"},"comments":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/bbcmicrobit/micropython/statuses/9aec40d96e5ed71dadc12ec297aa4f290f3acf01"}}}}