{"id":1952,"date":"2017-11-21T08:24:00","date_gmt":"2017-11-21T07:24:00","guid":{"rendered":"https:\/\/www.macerobotics.com\/?page_id=1952"},"modified":"2018-06-11T19:03:44","modified_gmt":"2018-06-11T18:03:44","slug":"programming-the-mrpiz-with-python","status":"publish","type":"page","link":"https:\/\/www.macerobotics.com\/?page_id=1952","title":{"rendered":"Programming the MRPiZ with python"},"content":{"rendered":"<h2 style=\"text-align: center;\"><span style=\"color: #ff9900;\"><strong>&nbsp;<\/strong><\/span><\/h2>\n<p>Programming the MRPiZ robot in python language .<\/p>\n<h1 style=\"text-align: center;\"><span style=\"color: #000000;\"><strong>API functions<\/strong><\/span><\/h1>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<ul>\n<li><strong><span style=\"color: #008000;\">Motors&nbsp;controls :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/forward-api-python\/\">forward()<\/a>&nbsp;: move the robot MRPiZ forward.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/forward_mm-api-arduino\"><span class=\"pl-s\">forward_mm<\/span>()&nbsp;<\/a>: move the robot MRPiZ forward with a millimeter parameter <em>(Pulling function)<\/em>.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/back-api-python\/\">back() <\/a>:&nbsp;move the robot MRPiZ back.<\/p>\n<p><span style=\"color: #3366ff;\"><strong><a href=\"https:\/\/www.macerobotics.com\/back_mm-api-python\/\"><span class=\"pl-s\">back_mm<\/span>()<\/a>&nbsp;<\/strong><\/span>: move the robot MRPiZ back with a millimeter parameter <em>(Pulling function)<\/em>.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/stop-api-python\/\">stop() <\/a>: stop the robot MRPiZ.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/turnright-api-python\/\">turnRight()<\/a> : turn right the robot MRPiZ.<\/p>\n<p><span style=\"color: #3366ff;\"><strong><a href=\"https:\/\/wp.me\/P6W0t8-Bp\">turnRight_degree()<\/a> : <\/strong><span style=\"color: #000000;\">turn right with a angle parameter&nbsp;<em>(Pulling function)<\/em>.<\/span><strong><br \/>\n<\/strong><\/span><\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/turnleft-api-python\/\">turnLeft()<\/a> :&nbsp;turn left&nbsp;the robot MRPiZ.<\/p>\n<p><span style=\"color: #3366ff;\"><strong><a href=\"https:\/\/wp.me\/P6W0t8-BB\">turnLeft_degree()<\/a> : <\/strong><span style=\"color: #000000;\">turn left with a angle parameter&nbsp;<em>(Pulling function)<\/em>.<\/span><strong><br \/>\n<\/strong><\/span><\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/motorright-api-python\/\">motorRight()<\/a>&nbsp;: control the right&nbsp;motor.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/motorleft-api-python\/\">motorLeft()<\/a>&nbsp;: control the left motor.<\/p>\n<hr>\n<ul>\n<li><strong><span style=\"color: #008000;\">Position and orientation controls :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/wp.me\/P6W0t8-Ce\"><strong><span style=\"color: #3366ff;\">controlEnable()<\/span><\/strong><\/a><span style=\"color: #3366ff;\"><span style=\"color: #000000;\">: Enable the position and orientation controls.<\/span><\/span><\/p>\n<p><a href=\"https:\/\/wp.me\/P6W0t8-Ch\"><strong><span style=\"color: #3366ff;\">controlDisable()<\/span><\/strong><\/a><span style=\"color: #3366ff;\"><span style=\"color: #000000;\">:&nbsp; Disable the position and orientation controls.<\/span><\/span><\/p>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<p><strong><span style=\"color: #008000;\">Robot position :<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/wp.me\/P6W0t8-C1\"><strong><span style=\"color: #3366ff;\">robotPositionX()<\/span><\/strong><\/a><span style=\"color: #3366ff;\"><span style=\"color: #000000;\">: read robot position on the x axis. <\/span><\/span><\/p>\n<p><a href=\"https:\/\/wp.me\/P6W0t8-C4\"><strong><span style=\"color: #3366ff;\">robotPositionY()<\/span><\/strong><\/a><span style=\"color: #000000;\">: read robot position on the y axis.&nbsp;<\/span><\/p>\n<p><a href=\"https:\/\/wp.me\/P6W0t8-C7\"><strong><span style=\"color: #3366ff;\">robotPositionO()<\/span><\/strong><\/a><span style=\"color: #3366ff;\">:&nbsp;<span style=\"color: #000000;\">read robot orientation.&nbsp;<\/span><\/span><\/p>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<ul>\n<li><strong><span style=\"color: #008000;\">Battery :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/battery\/\">battery()<\/a> : read the battery voltage.<\/p>\n<hr>\n<ul>\n<li><span style=\"color: #008000;\"><strong>Read usb voltage :<\/strong><\/span><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.macerobotics.com\/developers\/readvusb-api-python-mrpiz\/\">readVusb()<\/a> : read the usb voltage.<\/p>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<ul>\n<li><strong><span style=\"color: #008000;\">Firmware :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/firmwareversion-api-python\/\">firmwareVersion()<\/a> : return the firmware version.<\/p>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<ul>\n<li><strong><span style=\"color: #008000;\">Proximity sensors :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/proxsensor\/\">proxSensor() <\/a>: read the proximity sensors.<\/p>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<ul>\n<li><strong><span style=\"color: #008000;\">Switch :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/switch-api-python-2\/\">switch()<\/a> : read the switch.<\/p>\n<hr class=\"ttfmake-hr\" style=\"border-style: solid; border-top-width: 1px;\">\n<ul>\n<li><strong><span style=\"color: #008000;\">Encoder :<\/span><\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/encoderleft-api-python\/\">encoderLeft()<\/a> : read the encoder left value.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/encoderright-api-python\/\">encoderRight()<\/a> : read the encoder right value.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Programming the MRPiZ robot in python 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 (Pulling function). back() :&nbsp;move the robot MRPiZ back. back_mm()&nbsp;: move the robot MRPiZ back with a millimeter parameter (Pulling function). stop() : stop the robot MRPiZ. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1952","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/1952","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=1952"}],"version-history":[{"count":24,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/1952\/revisions"}],"predecessor-version":[{"id":2377,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/1952\/revisions\/2377"}],"wp:attachment":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}