{"id":24493,"date":"2018-05-09T10:34:14","date_gmt":"2018-05-09T17:34:14","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=24493"},"modified":"2021-06-09T14:49:40","modified_gmt":"2021-06-09T21:49:40","slug":"prototyping-with-the-raspberry-pi-pmod-hat","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/prototyping-with-the-raspberry-pi-pmod-hat\/","title":{"rendered":"Prototyping with the Raspberry Pi and Pmod HAT Adapter"},"content":{"rendered":"<p>Recently, DesignSpark discussed<a href=\"https:\/\/www.rs-online.com\/designspark\/starting-out-with-a-designspark-pmod-hat?cm_mmc=US-EM-_-DSN_20180423-_-DM103229-_-HB_URL&amp;cid=DM103229&amp;bid=747240202\"> how to get the Raspberry Pi up and running<\/a> with the <a href=\"https:\/\/digilent.com\/shop\/pmod-hat-adapter-pmod-expansion-for-raspberry-pi\/\">Pmod HAT<\/a> using Andrew Back&#8217;s Python library.<\/p>\n<figure id=\"attachment_24495\" aria-describedby=\"caption-attachment-24495\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-24495 size-medium\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet-600x450.jpg\" alt=\"\" width=\"600\" height=\"450\" data-wp-pid=\"24495\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet-1200x900-cropped.jpg 1200w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet.jpg 1440w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-24495\" class=\"wp-caption-text\">Photo courtesy of DesignSpark.<\/figcaption><\/figure>\n<p>First of all, you must install the libraries, which is covered thoroughly in Andrew Back&#8217;s<a href=\"https:\/\/www.rs-online.com\/designspark\/easy-peasy-peripheral-interfacing-with-pi-python-and-pmods\"> original article.\u00a0<\/a>After the installation, there is a set of examples for the Pmods. The article then goes into the Pmod\u00a0<a href=\"https:\/\/digilent.com\/shop\/pmod-oledrgb-96-x-64-rgb-oled-display-with-16-bit-color-resolution\/\">OLEDrgb<\/a> &#8220;Hello World&#8221; example. The Python code for this is shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24496\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/pa.png\" alt=\"\" width=\"587\" height=\"594\" data-wp-pid=\"24496\" \/><\/p>\n<p>The advantage of this setup is the fact that there is very little hardware set-up time to run the programs. If you want to attach a different sensor, it is a simple matter of switching the Pmods out to take a different measurement.<\/p>\n<p>The author shares some final thoughts on the project:<\/p>\n<blockquote><p>Andrew Back\u2019s library is a great starting point for a project as you can quickly and easily validate your hardware with the examples before using those examples as a jumping-off point for whatever it is you want to try out for yourself. Getting to grips with LED screens can be a bit daunting at first, but the examples really do give you what you need to get some pretty sophisticated screen displays up in record time.<\/p>\n<p>Altogether, the Pmod HAT and Andrew\u2019s library make a powerful \u2018quickstart\u2019 kit for your next project by allowing you to quickly (and cheaply) try things out, before settling on a hardware combination that you want to move forward with.<\/p><\/blockquote>\n<p>To find detailed instructions and more examples on this project, please check out<a href=\"https:\/\/www.rs-online.com\/designspark\/starting-out-with-a-designspark-pmod-hat?cm_mmc=US-EM-_-DSN_20180423-_-DM103229-_-HB_URL&amp;cid=DM103229&amp;bid=747240202\"> DesignSpark&#8217;s full article!<\/a><\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-24493 jlk' data-task='like' data-post_id='24493' data-nonce='8896bc70a6' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-24493 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-24493 jlk' data-task='unlike' data-post_id='24493' data-nonce='8896bc70a6' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-24493 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-24493 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Check out some demo projects you can do with the Pmod HAT adapter and Raspberry Pi!<\/p>\n","protected":false},"author":36,"featured_media":24495,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[38,4327,4324],"tags":[],"ppma_author":[4485],"class_list":["post-24493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-expansion-modules","category-projects","category-research-rapid-prototyping"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2018\/05\/HAT_Feet.jpg","jetpack_sharing_enabled":true,"authors":[{"term_id":4485,"user_id":36,"is_guest":0,"slug":"mirandamay7","display_name":"Miranda Hansen","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bcab037c32924b9f9b3ca4898e179f2764cb7d9a82aa2bd475170c8aaa884e1c?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/24493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=24493"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/24493\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/24495"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=24493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=24493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=24493"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=24493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}