{"id":365,"date":"2013-04-07T00:14:49","date_gmt":"2013-04-07T00:14:49","guid":{"rendered":"http:\/\/tola.me.uk\/blog\/?p=365"},"modified":"2013-04-07T00:33:17","modified_gmt":"2013-04-07T00:33:17","slug":"introducing_drd_pi","status":"publish","type":"post","link":"https:\/\/tola.me.uk\/blog\/2013\/04\/07\/introducing_drd_pi\/","title":{"rendered":"Introducing DRD Pi"},"content":{"rendered":"<p>I&#8217;m trying to build a Raspberry Pi powered robot based on the DRDs from Farscape, I thought I&#8217;d blog my progress.<\/p>\n<h2>DRD<\/h2>\n<p>DRDs or &#8220;Diagnostic Repair Drones&#8221; are robots from the cult science fiction series <a href=\"http:\/\/en.wikipedia.org\/wiki\/Farscape\">Farscape<\/a>. They carry out various functions aboard a leviathian (a species of living biomechanoid spaceship) including repairing and maintaining the ship. They&#8217;re ovoid in shape and they have two moving eye stalks and all sorts of tools like a robotic claw and a plasma welder.<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/2013\/04\/07\/introducing_drd_pi\/drd_01\/\" rel=\"attachment wp-att-370\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-370 aligncenter\" alt=\"DRD\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/DRD_01.jpg\" width=\"260\" height=\"267\" \/><\/a><\/p>\n<p>Here&#8217;s some video footage from the series to give you an idea of what these little guys get up to:<\/p>\n<p><iframe loading=\"lazy\" src=\"http:\/\/www.youtube.com\/embed\/ZI9n2x9d6Ow\" height=\"315\" width=\"420\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<h2>DRD Kit<\/h2>\n<p>The original DRDs were designed and built by the extremely talented folks at the <a href=\"http:\/\/www.creatureshop.com\/\">Jim Henson Creature Shop<\/a> in London\u00a0(yes Jim Henson as in the Muppets!). They built lots of different variations of the robot over the years to be used in shooting different scenes for the show, but to my knowledge they&#8217;ve never released any designs.<\/p>\n<p>I assumed I was going to have to painstakingly design a 3D computer model of one based on frame grabs from my DVDs of the series. I then planned to track down someone with a CNC router and a vacuum forming machine and persuade them to let me use them. Either that or find someone with an industrial sized 3D printer!<\/p>\n<p>Luckily I came across a special effects company in the US who sells a\u00a0<a href=\"http:\/\/goldenarmor.com\/farscape-drd\/\">kit<\/a>\u00a0to build a model of a DRD. The model is made from hollow cast fiberglass and resin and comes with ribbed plastic for the eye stalks, eye pieces with clear lenses, two parts of a claw and some colourful wires to make it look the part.<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/drd_kit.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"drd_kit\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/drd_kit-300x239.jpg\" width=\"300\" height=\"239\" \/><\/a><\/p>\n<p>The kit isn&#8217;t perfect. The size, shape and proportions aren&#8217;t quite right and the finish is a bit rough but it&#8217;s good enough for my purposes. The part I&#8217;m really interested in is the robotics so I&#8217;m grateful that someone has already done the work for me on the basic shell.<\/p>\n<p>The web site provides video tutorials on how to build the model and then how to put LEDs in the eyes and mount an remote controlled car underneath to make it move about in a bit of a crude fashion.<\/p>\n<p>We can be a bit more sophisticated than that.<\/p>\n<h2>Raspberry Pi<\/h2>\n<p>The <a href=\"http:\/\/en.wikipedia.org\/wiki\/Raspberry_Pi\">Raspberry Pi<\/a> is a credit-card sized computer developed in the UK by the not-for-profit Raspberry Pi Foundation to promote the teaching of programming in schools. It&#8217;s a single-board computer with a 700Mhz ARM processor and 512MB RAM, boots off an SD card and costs only around \u00a330.<\/p>\n<p>This is my Raspberry Pi:<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-374\" alt=\"raspberry_pi\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi-300x225.jpg 300w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>Gertboard<\/h2>\n<p>The <a href=\"http:\/\/www.raspberrypi.org\/archives\/tag\/gertboard\">Gertboard<\/a> is an\u00a0expansion\u00a0board which attaches to the Raspberry Pi via its GPIO pins and helps when experimenting with interfacing the Pi with the outside world. It comes with an Arduino compatible AVR microcontroller,\u00a0analogue to digital converters, digital to analogue converters, a motor controller, push buttons, LEDs and much more.<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/gertboard.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-376\" alt=\"gertboard\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/gertboard-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/gertboard-300x225.jpg 300w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/gertboard-1024x768.jpg 1024w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/gertboard.jpg 1632w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>Booting the Pi<\/h2>\n<p>The Raspberry Pi can boot Linux from an SD card and the most popular distribution is <a href=\"http:\/\/www.raspbian.org\/\">Raspbian<\/a> which is a Debian-derivative.\u00a0You can download an image and flash it to an SD card, or even <a href=\"http:\/\/uk.farnell.com\/samsung\/raspberry-pi-prog-4gb-sdcard\/memory-sdhc-rd-raspberry-pi-4gb\/dp\/2113756\">buy<\/a> an SD card with it already loaded.<\/p>\n<p>To boot the Raspberry Pi all you need to do is insert your Raspbian SD card, plug it into a TV via either the HDMI port or the composite video port and power it up by plugging it into a Micro USB phone charger.<\/p>\n<p>Here&#8217;s my Raspberry Pi booted and plugged into an old CRT TV:<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi_and_tv.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-381\" alt=\"raspberry_pi_and_tv\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi_and_tv-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi_and_tv-300x225.jpg 300w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi_and_tv-1024x768.jpg 1024w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/raspberry_pi_and_tv.jpg 1632w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Logging In Remotely<\/h2>\n<p>It&#8217;s cool that I can plug the Raspberry Pi into a TV, but I don&#8217;t want to be squinting at an old portable TV or sitting in the lounge next to my big flatscreen TV all the time I&#8217;m programming the robot, so I want to be able to log in remotely. Also, my plan is to build a web interface to control the robot over WiFi, so it&#8217;s going to need to connect to a network at some point.<\/p>\n<p>First I plugged a USB keyboard into the Raspberry Pi and an ethernet cable to connect it to my network. The <a href=\"http:\/\/en.wikipedia.org\/wiki\/Secure_Shell\">SSH daemon<\/a> is already started by default, but I wanted to set a static IP address so that I always knew what to log in to.<\/p>\n<p>I logged into the Raspberry Pi locally (the default username is pi and the password is raspberry) and edited the network configuration using the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Vi\">vi<\/a> text editor.<\/p>\n<pre>$ sudo vi \/etc\/network\/interfaces<\/pre>\n<p>I provided the following configuration to assign a static IP address of 192.168.1.42 on my local network:<\/p>\n<pre>auto lo\r\niface lo inet loopback\r\n\r\nauto eth0\r\niface eth0 inet static\r\naddress 192.168.1.42\r\nnetmask 255.255.255.0\r\ngateway 192.168.1.1\r\n\r\nThen restart the network interface with:<\/pre>\n<pre>$ sudo ifdown -a\r\n$ sudo ifup -a<\/pre>\n<p>Then check that I&#8217;m connected to the network, and the Internet by pinging Google.<\/p>\n<pre>$ ping google.com<\/pre>\n<p>I see that I&#8217;m successfully connected, so I can now log into the Raspberry Pi remotely using its new static IP.<\/p>\n<p>From my desktop Linux box I type:<\/p>\n<pre>$ ssh pi@192.168.1.42<\/pre>\n<p>type in the password &#8220;raspberry&#8221;, and voil\u00e0! I&#8217;m logged in.<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/ssh.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-393\" alt=\"ssh\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/ssh-300x180.png\" width=\"300\" height=\"180\" srcset=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/ssh-300x180.png 300w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/ssh.png 722w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>What&#8217;s Next<\/h2>\n<p>I hope you weren&#8217;t expecting to see a finished robot! There&#8217;s a very long way to go yet.<\/p>\n<p>If you desperately wanted to see a finished robot, here&#8217;s a picture of\u00a0<a href=\"https:\/\/tola.me.uk\/blog\/2007\/05\/03\/robot_race_success\/\">the last one I worked on<\/a>, a line following robot we built at university powered by a PIC microcontroller.<\/p>\n<p><a href=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/BEAST.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-399\" alt=\"BEAST\" src=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/BEAST-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/BEAST-300x225.jpg 300w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/BEAST-1024x768.jpg 1024w, https:\/\/tola.me.uk\/blog\/wp-content\/uploads\/2013\/04\/BEAST.jpg 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Next I want to start playing around with the Gertboard and and make LEDs blink on and off from Python.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to build a Raspberry Pi powered robot based on the DRDs from Farscape, I thought I&#8217;d blog my progress. DRD DRDs or &#8220;Diagnostic Repair Drones&#8221; are robots from the cult science fiction series Farscape. They carry out various functions aboard a leviathian (a species of living biomechanoid spaceship) including repairing and maintaining the &hellip; <a href=\"https:\/\/tola.me.uk\/blog\/2013\/04\/07\/introducing_drd_pi\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Introducing DRD Pi<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-365","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts\/365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/comments?post=365"}],"version-history":[{"count":37,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts\/365\/revisions"}],"predecessor-version":[{"id":408,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts\/365\/revisions\/408"}],"wp:attachment":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/media?parent=365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/categories?post=365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/tags?post=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}