{"id":2087,"date":"2018-01-18T14:56:41","date_gmt":"2018-01-18T13:56:41","guid":{"rendered":"https:\/\/www.macerobotics.com\/?page_id=2087"},"modified":"2018-01-18T14:56:41","modified_gmt":"2018-01-18T13:56:41","slug":"programming-the-mrpiz-with-c","status":"publish","type":"page","link":"https:\/\/www.macerobotics.com\/?page_id=2087","title":{"rendered":"Programming the MRPiZ with C"},"content":{"rendered":"<h2><strong>&nbsp;<\/strong><\/h2>\n<p>Programming the MRPiZ robot in C 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><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.<\/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><strong><span class=\"pl-s\">back_mm<\/span>()&nbsp;<\/strong>: move the robot MRPiZ back with a millimeter parameter.<\/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><strong>turnRight_degree() : <\/strong>turn right with a angle parameter.<strong><br \/>\n<\/strong><\/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><strong>turnLeft_degree() : <\/strong>turn left with a angle parameter.<strong><br \/>\n<\/strong><\/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 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><a href=\"http:\/\/www.macerobotics.com\/programming-with-python\/programming-the-mrpi1-with-python\/battery\/\">battery()<\/a> : read the battery voltage.<\/p>\n<hr class=\"ttfmake-hr\">\n<ul>\n<li><strong>Firmware :<\/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\">\n<ul>\n<li><strong>Proximity sensors :<\/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\">\n<ul>\n<li><strong>Switch :<\/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\">\n<ul>\n<li><strong>Encoder :<\/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 C 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":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2087","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/2087","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=2087"}],"version-history":[{"count":1,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/2087\/revisions"}],"predecessor-version":[{"id":2088,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/pages\/2087\/revisions\/2088"}],"wp:attachment":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}