{"id":2097,"date":"2018-01-19T16:04:21","date_gmt":"2018-01-19T15:04:21","guid":{"rendered":"https:\/\/www.macerobotics.com\/?page_id=2097"},"modified":"2018-01-19T16:04:21","modified_gmt":"2018-01-19T15:04:21","slug":"programming-the-mrpiz-with-java","status":"publish","type":"page","link":"https:\/\/www.macerobotics.com\/?page_id=2097","title":{"rendered":"Programming the MRPiZ with Java"},"content":{"rendered":"<h2><strong>&nbsp;<\/strong><\/h2>\n<p>Programming the MRPiZ robot in Java language .<\/p>\n<h1><strong>API functions<\/strong><\/h1>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Motors&nbsp;controls :<\/strong><\/li>\n<\/ul>\n<p><strong>forward()<\/strong>&nbsp;: move the robot MRPiZ forward.<\/p>\n<p><strong><span class=\"pl-s\">forward_mm<\/span>()<\/strong>&nbsp;: move the robot MRPiZ forward with a millimeter parameter.<\/p>\n<p><strong>back()<\/strong> :&nbsp;move the robot MRPiZ back.<\/p>\n<p><strong><span class=\"pl-s\">back_mm<\/span>()&nbsp;<\/strong>: move the robot MRPiZ back with a millimeter parameter.<\/p>\n<p><strong>stop()<\/strong> : stop the robot MRPiZ.<\/p>\n<p><strong>turnRight() <\/strong>: turn right the robot MRPiZ.<\/p>\n<p><strong>turnRight_degree() : <\/strong>turn right with a angle parameter.<strong><br \/>\n<\/strong><\/p>\n<p><strong>turnLeft() <\/strong>:&nbsp;turn left&nbsp;the robot MRPiZ.<\/p>\n<p><strong>turnLeft_degree() : <\/strong>turn left with a angle parameter.<strong><br \/>\n<\/strong><\/p>\n<p><strong>motorRight()<\/strong>&nbsp;: control the right&nbsp;motor.<\/p>\n<p><strong>motorLeft()<\/strong>&nbsp;: control the left motor.<\/p>\n<hr class=\"ttfmake-hr\">\n<p><strong>Robots controls :<\/strong><\/p>\n<p><strong>robotPositionX()<\/strong>: read robot position on the x axis.<\/p>\n<p><strong>robotPositionY()<\/strong>: read robot position on the y axis.&nbsp;<\/p>\n<p><strong>robotPositionO()<\/strong>:read robot orientation .&nbsp;<\/p>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Battery :<\/strong><\/li>\n<\/ul>\n<p><strong>battery() <\/strong>: read the battery voltage.<\/p>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Firmware :<\/strong><\/li>\n<\/ul>\n<p><strong>firmwareVersion() <\/strong>: return the firmware version.<\/p>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Proximity sensors :<\/strong><\/li>\n<\/ul>\n<p><strong>proxSensor()<\/strong> : read the proximity sensors.<\/p>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Switch :<\/strong><\/li>\n<\/ul>\n<p><strong>switch()<\/strong> : read the switch.<\/p>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Encoder :<\/strong><\/li>\n<\/ul>\n<p><strong>encoderLeft()<\/strong> : read the encoder left value.<\/p>\n<p><strong>encoderRight() <\/strong>: read the encoder right value.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Programming the MRPiZ robot in Java language . API functions Motors&nbsp;controls : forward()&nbsp;: move the robot MRPiZ forward. forward_mm()&nbsp;: move the robot MRPiZ forward with a millimeter parameter. back() :&nbsp;move the robot MRPiZ back. back_mm()&nbsp;: move the robot MRPiZ back with a millimeter parameter. stop() : stop the robot MRPiZ. turnRight() : turn right &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":524,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2097","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/2097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2097"}],"version-history":[{"count":1,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/2097\/revisions"}],"predecessor-version":[{"id":2098,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/2097\/revisions\/2098"}],"up":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/524"}],"wp:attachment":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}