{"id":1279,"date":"2016-05-06T16:53:59","date_gmt":"2016-05-06T16:53:59","guid":{"rendered":"http:\/\/4tronix.co.uk\/blog\/?p=1279"},"modified":"2016-07-10T11:00:30","modified_gmt":"2016-07-10T11:00:30","slug":"botzero-dual-mode-robot-arduino-vs-raspberry-pi","status":"publish","type":"post","link":"https:\/\/4tronix.co.uk\/blog\/?p=1279","title":{"rendered":"Ar2Pi2 &#8211; Dual Mode Robot &#8211; Arduino vs Raspberry Pi"},"content":{"rendered":"<h1>Ar2Pi2 &#8211; The Robot That Can be Arduino or Raspberry Pi<\/h1>\n<h2>(Previously known as BotZero)<\/h2>\n<p>Click on any photo to enlarge.<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero03a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1281\" alt=\"botzero03a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero03a-300x239.jpg\" width=\"300\" height=\"239\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero03a-300x239.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero03a.jpg 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3>Ar2Pi2 as an Arduino Uno compatible robot<\/h3>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero07.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1282\" alt=\"botzero07\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero07-300x239.jpg\" width=\"300\" height=\"239\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero07-300x239.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero07.jpg 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3>Ar2Pi2 as a Raspberry Pi robot<\/h3>\n<p>&nbsp;<\/p>\n<h2>Overview<\/h2>\n<p>Ar2Pi2 is a tiny robot that fits well inside the boundaries of an A6 sheet of paper (148 x 105mm). This makes it ideal for Micro Pi Noon and other small robot competitions.<\/p>\n<p>Including the wheels it is 110 x 90mm and is 60mm high<\/p>\n<p>The robot contains an ATMega328 which can be programmed over the USB interface just like an Arduino Uno. The robot is then fully programmable using any of the standard Arduino methods. A simple demo program is <a title=\"Ar2Pi2 Arduino Demo Code\" href=\"http:\/\/4tronix.co.uk\/ar2pi2\/BotZMotor.ino\" target=\"_blank\">BotZMotor.ino<\/a><\/p>\n<p>Alternatively, you can program the ATMega328 with the <a title=\"Ar2Pi2 Raspberry Pi Code\" href=\"http:\/\/4tronix.co.uk\/ar2pi2\/BotZero01.ino\" target=\"_blank\">BotZero01.ino <\/a>code and plug in your Raspberry Pi Zero and use the Pi to control the robot. This is very similar to the way our Picon Zero intelligent robotic controller works (in fact they share a lot of the same code). In this Raspberry Pi mode, there is a full Python library to enable you to control everything on the robot from python running on the Pi<\/p>\n<p>The whole robot is powered by 3 AA cells. There is an onboard &#8220;boost&#8221; regulator to generate the 5V needed for the Pi.<\/p>\n<p>&nbsp;<\/p>\n<h2>Features<\/h2>\n<ul>\n<li>Hardware controlled by ATMega328<\/li>\n<li>Powered by 3xAA batteries<\/li>\n<li>6 x RGB pixels (mini &#8220;neopixels&#8221;)<\/li>\n<li>2 x Analog light sensors<\/li>\n<li>2 x Analog line following sensors<\/li>\n<li>2 x DC motors fitted in servo cases<\/li>\n<li>Large 60mm diameter wheels<\/li>\n<li>Front smooth running caster<\/li>\n<li>USB interface to the ATMega328<\/li>\n<li>4 x general purpose I\/O lines with GVS (Ground, Volts, Signal) 3-pin connections. These can be Digital or Analog etc (just like Picon Zero)<\/li>\n<li>On\/Off switch<\/li>\n<li>Special fitting for Micro Pi Noon balloon holder and popper (If this is fitted, the 4 I\/O lines GVS pins cannot be used)<\/li>\n<li>Designed for Raspberry Pi Zero, but other Raspberry Pis could be fitted by using a suitable extension header<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Pictorial Overview<\/h2>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero05a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1283\" alt=\"botzero05a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero05a-300x215.jpg\" width=\"300\" height=\"215\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero05a-300x215.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/botzero05a.jpg 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Assembling the Kit<\/h2>\n<h3>Step 1 &#8211; Attach the Bottom plate and mounting pillars<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1285\" alt=\"step01a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01a-300x195.jpg\" width=\"300\" height=\"195\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01a-300x195.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01a.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Check you have the bottom mounting plate, 2 pan-head screws and 2 10mm pillars<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01b.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1286\" alt=\"step01b\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01b-300x183.jpg\" width=\"300\" height=\"183\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01b-300x183.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01b.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Orient the bottom plate so the holes clear the soldered components as shown<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01c.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1287\" alt=\"step01c\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01c-300x195.jpg\" width=\"300\" height=\"195\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01c-300x195.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01c.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Push the screws through the bottom plate and the main board, then screw into the 10mm pillars<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01d.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1288\" alt=\"step01d\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01d-300x213.jpg\" width=\"300\" height=\"213\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01d-300x213.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step01d.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 2 &#8211; Attach the Motors<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1289\" alt=\"step02a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02a-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02a-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02a.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>All you need is the motors. Ensure the wires exit from the back of the motors and the red wires are both on the inside as shown<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02b.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1290\" alt=\"step02b\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02b-300x213.jpg\" width=\"300\" height=\"213\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02b-300x213.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step02b.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Carefully twist the wires so they fit between the motors, ensuring they don&#8217;t go over the motors<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 3 &#8211; Fit the Battery Holder<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1291\" alt=\"step03a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03a-300x200.jpg\" width=\"300\" height=\"200\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03a-300x200.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03a.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>You&#8217;ll need the battery holder and 2 countersink head screws<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03b.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1292\" alt=\"step03b\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03b-300x186.jpg\" width=\"300\" height=\"186\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03b-300x186.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03b.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>First connect the battery holder to the screw terminals. Red towards the rear, marked Vin<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03c.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1293\" alt=\"step03c\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03c-300x247.jpg\" width=\"300\" height=\"247\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03c-300x247.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step03c.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Twist the wires in between the 2 motors &#8211; again being careful that the wires do not get trapped between the motors and the battery holder. Warning: this is tricky! You can leave the wires out which is much easier, but it doesn&#8217;t look as tidy, so it is worth persevering.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 4 &#8211; Fit the Front Caster<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1294\" alt=\"step04a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04a-300x190.jpg\" width=\"300\" height=\"190\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04a-300x190.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04a.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Use the short 6mm screws (in the separate bag of screws and pillars) and note that the spacers provided with the caster are not required<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04b.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1295\" alt=\"step04b\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04b-300x191.jpg\" width=\"300\" height=\"191\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04b-300x191.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04b.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>With the ball out of the holder, push the screws through the black holder and through the PCB<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04c.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1296\" alt=\"step04c\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04c-300x162.jpg\" width=\"300\" height=\"162\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04c-300x162.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04c.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Screw the nuts on tight<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04d.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1297\" alt=\"step04d\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04d-300x187.jpg\" width=\"300\" height=\"187\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04d-300x187.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step04d.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Finally, push the steel ball into the holder. It should snap tightly in and move very smoothly<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 5 &#8211; Attach the Wheels<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1298\" alt=\"step05a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05a-300x249.jpg\" width=\"300\" height=\"249\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05a-300x249.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05a.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>First stretch the tyres over the plastic wheels. Then push the wheels onto the shafts of the motors<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05b.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1299\" alt=\"step05b\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05b-300x202.jpg\" width=\"300\" height=\"202\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05b-300x202.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2016\/05\/step05b.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Use the screws provided to tightly fix the wheels<\/p>\n<p>&nbsp;<\/p>\n<h3>Your Ar2Pi2 is ready to rock and roll!<\/h3>\n<p>Add batteries and switch it on to demo the LEDs and the motor operations. Next step, write some programs&#8230;<\/p>\n<p>&nbsp;<\/p>\n<p>Download the python library and examples <a title=\"Ar2Pi2 Python Examples\" href=\"http:\/\/4tronix.co.uk\/ar2pi2\/Ar2Pi2_Python.rar\" target=\"_blank\">from here<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ar2Pi2 &#8211; The Robot That Can be Arduino or Raspberry Pi (Previously known as BotZero) Click on any photo to enlarge. Ar2Pi2 as an Arduino Uno compatible robot &nbsp; Ar2Pi2 as a Raspberry Pi robot &nbsp; Overview Ar2Pi2 is a tiny robot that fits well inside the boundaries of an A6 sheet of paper (148 &hellip; <a href=\"https:\/\/4tronix.co.uk\/blog\/?p=1279\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Ar2Pi2 &#8211; Dual Mode Robot &#8211; Arduino vs Raspberry Pi<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4],"tags":[],"class_list":["post-1279","post","type-post","status-publish","format-standard","hentry","category-arduino-robotics","category-robotics-for-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1279"}],"version-history":[{"count":13,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1279\/revisions"}],"predecessor-version":[{"id":1352,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1279\/revisions\/1352"}],"wp:attachment":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}