{"id":142,"date":"2011-01-06T23:02:17","date_gmt":"2011-01-06T23:02:17","guid":{"rendered":"http:\/\/charlie-roberts.com\/Control\/?page_id=142"},"modified":"2011-01-06T23:02:17","modified_gmt":"2011-01-06T23:02:17","slug":"compass","status":"publish","type":"page","link":"http:\/\/charlie-roberts.com\/Control\/?page_id=142","title":{"rendered":"Compass"},"content":{"rendered":"<p>The compass uses the device&#8217;s magnetometer to give a heading reading between 0 &#8211; 360. Note that this value is only accurate when the device is relatively flat. There is no control over update rate; updates are received whenever the device perceives a change in orientation.<\/p>\n<p><strong>Additional JSON Attributes<\/strong><\/p>\n<ul>\n<li>onvaluechange &#8211; this event handler is called after the magnetometer has been read but before its value it outputted.<\/li>\n<\/ul>\n<p><strong>Simple JSON<\/strong><\/p>\n<pre>\r\n{\r\n    \"name\":\"comp\", \"type\":\"Compass\",\r\n    \"protocol\":\"local\",\r\n    \"min\":0, \"max\":1,\r\n},\r\n<\/pre>\n<p><strong>Extra JSON<\/strong><\/p>\n<pre>\r\n{\r\n    \"name\":\"comp\", \"type\":\"Compass\",\r\n    \"onchange\":\"compLabel.changeValue(this.value);\",\r\n    \"protocol\":\"local\",\r\n    \"min\":0, \"max\":1\r\n},\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The compass uses the device&#8217;s magnetometer to give a heading reading between 0 &#8211; 360. Note that this value is only accurate when the device is relatively flat. There is no control over update rate; updates are received whenever the device perceives a change in orientation. Additional JSON Attributes onvaluechange &#8211; this event handler is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":56,"menu_order":9,"comment_status":"open","ping_status":"open","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-142","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/pages\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":1,"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/pages\/142\/revisions"}],"predecessor-version":[{"id":143,"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/pages\/142\/revisions\/143"}],"up":[{"embeddable":true,"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=\/wp\/v2\/pages\/56"}],"wp:attachment":[{"href":"http:\/\/charlie-roberts.com\/Control\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}