{"id":1899,"date":"2013-02-05T08:54:27","date_gmt":"2013-02-05T08:54:27","guid":{"rendered":"http:\/\/178.62.14.192\/?p=1899"},"modified":"2013-02-05T08:54:27","modified_gmt":"2013-02-05T08:54:27","slug":"nanpy-use-your-arduino-with-python-and-the-raspberrypi","status":"publish","type":"post","link":"https:\/\/www.recantha.co.uk\/blog\/?p=1899","title":{"rendered":"nanpy &#8211; Use your Arduino with Python and the #RaspberryPi"},"content":{"rendered":"<p>The <strong>nanpy<\/strong> library allows Python programmers to communicate with an Arduino connected via a serial line connected to a host computer (in our case, a Raspberry Pi).<\/p>\n<p>It is similar to pyFirmata.\u00a0The nanpy library is under development and has a long way to go to get up to the level of that other library, but it looks promising and simple to use.<\/p>\n<p>One big thing that is missing at the moment, however, is a guide on what the Arduino needs to be running in order for it to work! I will contact the authors and find out!<\/p>\n<p><em>Edit: It seems that there is a firmware folder in the nanpy package that you upload to the Arduino. I find it slightly surprising (and a bit confusing) that this isn&#8217;t spelt out in the &#8216;How to use documentation&#8217; but, hey, it is under development!<\/em><\/p>\n<p>The\u00a0<a href=\"http:\/\/pypi.python.org\/pypi\/nanpy\">nanpy 0.7 package is available here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The nanpy library allows Python programmers to communicate with an Arduino connected via a serial line connected to a host computer (in our case, a Raspberry Pi). It is similar to pyFirmata.\u00a0The nanpy library is under development and has a&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[55,39],"tags":[],"class_list":["post-1899","post","type-post","status-publish","format-standard","hentry","category-arduino","category-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>nanpy - Use your Arduino with Python and the #RaspberryPi - Raspberry Pi Pod<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"nanpy - Use your Arduino with Python and the #RaspberryPi - Raspberry Pi Pod\" \/>\n<meta property=\"og:description\" content=\"The nanpy library allows Python programmers to communicate with an Arduino connected via a serial line connected to a host computer (in our case, a Raspberry Pi). It is similar to pyFirmata.\u00a0The nanpy library is under development and has a&hellip;Read more &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\" \/>\n<meta property=\"og:site_name\" content=\"Raspberry Pi Pod\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/recantha\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-05T08:54:27+00:00\" \/>\n<meta name=\"author\" content=\"Michael Horne\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@recantha\" \/>\n<meta name=\"twitter:site\" content=\"@recantha\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Horne\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\"},\"author\":{\"name\":\"Michael Horne\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\"},\"headline\":\"nanpy &#8211; Use your Arduino with Python and the #RaspberryPi\",\"datePublished\":\"2013-02-05T08:54:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\"},\"wordCount\":160,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"articleSection\":[\"Arduino\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=1899#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\",\"name\":\"nanpy - Use your Arduino with Python and the #RaspberryPi - Raspberry Pi Pod\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\"},\"datePublished\":\"2013-02-05T08:54:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=1899\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=1899#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.recantha.co.uk\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"nanpy &#8211; Use your Arduino with Python and the #RaspberryPi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"name\":\"Raspberry Pi Pod\",\"description\":\"Experiences with the Raspberry Pi micro computer and microcontroller\",\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\",\"name\":\"Raspberry Pi Pod\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"width\":800,\"height\":337,\"caption\":\"Raspberry Pi Pod\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/recantha\/\",\"https:\/\/x.com\/recantha\",\"https:\/\/www.linkedin.com\/in\/recantha\/\",\"https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\",\"name\":\"Michael Horne\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"caption\":\"Michael Horne\"},\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"nanpy - Use your Arduino with Python and the #RaspberryPi - Raspberry Pi Pod","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.recantha.co.uk\/blog\/?p=1899","og_locale":"en_US","og_type":"article","og_title":"nanpy - Use your Arduino with Python and the #RaspberryPi - Raspberry Pi Pod","og_description":"The nanpy library allows Python programmers to communicate with an Arduino connected via a serial line connected to a host computer (in our case, a Raspberry Pi). It is similar to pyFirmata.\u00a0The nanpy library is under development and has a&hellip;Read more &rarr;","og_url":"https:\/\/www.recantha.co.uk\/blog\/?p=1899","og_site_name":"Raspberry Pi Pod","article_publisher":"https:\/\/www.facebook.com\/recantha\/","article_published_time":"2013-02-05T08:54:27+00:00","author":"Michael Horne","twitter_card":"summary_large_image","twitter_creator":"@recantha","twitter_site":"@recantha","twitter_misc":{"Written by":"Michael Horne","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=1899#article","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=1899"},"author":{"name":"Michael Horne","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263"},"headline":"nanpy &#8211; Use your Arduino with Python and the #RaspberryPi","datePublished":"2013-02-05T08:54:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=1899"},"wordCount":160,"commentCount":0,"publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"articleSection":["Arduino","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.recantha.co.uk\/blog\/?p=1899#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=1899","url":"https:\/\/www.recantha.co.uk\/blog\/?p=1899","name":"nanpy - Use your Arduino with Python and the #RaspberryPi - Raspberry Pi Pod","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#website"},"datePublished":"2013-02-05T08:54:27+00:00","breadcrumb":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=1899#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.recantha.co.uk\/blog\/?p=1899"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=1899#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.recantha.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"nanpy &#8211; Use your Arduino with Python and the #RaspberryPi"}]},{"@type":"WebSite","@id":"https:\/\/www.recantha.co.uk\/blog\/#website","url":"https:\/\/www.recantha.co.uk\/blog\/","name":"Raspberry Pi Pod","description":"Experiences with the Raspberry Pi micro computer and microcontroller","publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.recantha.co.uk\/blog\/#organization","name":"Raspberry Pi Pod","url":"https:\/\/www.recantha.co.uk\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","width":800,"height":337,"caption":"Raspberry Pi Pod"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/recantha\/","https:\/\/x.com\/recantha","https:\/\/www.linkedin.com\/in\/recantha\/","https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg"]},{"@type":"Person","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263","name":"Michael Horne","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","caption":"Michael Horne"},"url":"https:\/\/www.recantha.co.uk\/blog\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2RsaV-uD","jetpack-related-posts":[{"id":1720,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=1720","url_meta":{"origin":1899,"position":0},"title":"Instructable for Arduino \/ #RaspberryPi Internet Radio","author":"Michael Horne","date":"2 February 2013","format":false,"excerpt":"I love Instructable. Sometimes you get some really cool projects with really clear instructions. Here's another one! This is a\u00a0project for Arduino and Raspberry Pi to make an Internet Radio. \"Raspberry Pi runs mpd music player daemon to receive and decode the internet radio stream. ALSA running on the Raspberry\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1986,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=1986","url_meta":{"origin":1899,"position":1},"title":"A look at #RaspberryPi to #Arduino communication libraries \/ @Raspberry_Pi","author":"Michael Horne","date":"8 February 2013","format":false,"excerpt":"I've been using pyFirmata to power my PiPodCorder project that uses a RaspberryPi and an Arduino to read a load of sensors and display them to an LCD screen. However, I've been noticing that there are a few alternatives. I'm going to try and do a little on-paper evaluation of\u2026","rel":"","context":"In &quot;Arduino&quot;","block_context":{"text":"Arduino","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=55"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5461,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=5461","url_meta":{"origin":1899,"position":2},"title":"New edition of The MagPi (August 2013) for the #RaspberryPi","author":"Michael Horne","date":"3 August 2013","format":false,"excerpt":"This month's MagPi is out and contains the following articles: Using Nanpy to connect your Raspberry Pi to an Arduino Using the Ino command line toolkit to do command line Arduino programming. Advanced operation of the camera module Timekeeping with a real-time clock Part 3 of the Pi Matrix series\u2026","rel":"","context":"In &quot;Magazines&quot;","block_context":{"text":"Magazines","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=29"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6235,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=6235","url_meta":{"origin":1899,"position":3},"title":"The MagPi issue 17 is out for #RaspberryPi","author":"Michael Horne","date":"3 October 2013","format":false,"excerpt":"This month's issue features: Robotics with BrickPi I\/O expansion boards Radio interface Scratch - fire ballistic missiles C - unions and dynamic memory allocation NanPy Eye tracking XML Download the issue here","rel":"","context":"In &quot;Magazines&quot;","block_context":{"text":"Magazines","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=29"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11589,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=11589","url_meta":{"origin":1899,"position":4},"title":"Plot data from an Arduino on the Raspberry Pi with Python","author":"Michael Horne","date":"11 December 2014","format":false,"excerpt":"Rick Sellens has posted up some simple code to plot data returned from an Arduino using Python and the pyplot library. I've asked him to also post up the code from the Arduino so we can see both sides of the process. Read how to do it\u00a0here.","rel":"","context":"In &quot;Arduino&quot;","block_context":{"text":"Arduino","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=55"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-_xsOpjonIRM\/VIj2X5yQ-HI\/AAAAAAAAC6c\/FfJQJvlYe1E\/s1600\/Untitled.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-_xsOpjonIRM\/VIj2X5yQ-HI\/AAAAAAAAC6c\/FfJQJvlYe1E\/s1600\/Untitled.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/4.bp.blogspot.com\/-_xsOpjonIRM\/VIj2X5yQ-HI\/AAAAAAAAC6c\/FfJQJvlYe1E\/s1600\/Untitled.png?resize=525%2C300 1.5x"},"classes":[]},{"id":11048,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=11048","url_meta":{"origin":1899,"position":5},"title":"Use Firmata to communicate with an Arduino from a Raspberry Pi","author":"Michael Horne","date":"21 September 2014","format":false,"excerpt":"Here's a great tutorial, and accompanying video (see below), from \"Android Eric\" in which he describes how to use the Firmata sketch on an Arduino and a python library on the Raspberry Pi.","rel":"","context":"In &quot;Arduino&quot;","block_context":{"text":"Arduino","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=55"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1899"}],"version-history":[{"count":0,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1899\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}