{"id":16205,"date":"2016-08-25T10:00:03","date_gmt":"2016-08-25T17:00:03","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=16205"},"modified":"2021-06-16T13:56:44","modified_gmt":"2021-06-16T20:56:44","slug":"fundementals-of-writing-a-library","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/","title":{"rendered":"FUNdamentals of Writing a Library"},"content":{"rendered":"<p>Since working at Digilent, I have learned several lessons. One of these is that whenever I am done programming a library, I should have some fun by creating a small side project using it. This way, I can understand my library on a new depth, and find any limitations or errors in it. Also I get to have fun, which is well, always fun!<\/p>\n<figure id=\"attachment_16215\" aria-describedby=\"caption-attachment-16215\" style=\"width: 600px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-16215 size-medium\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/20160816_150920-1-600x338.jpg\" alt=\"20160816_150920\" width=\"600\" height=\"338\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/20160816_150920-1-600x338.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/20160816_150920-1-768x432.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/20160816_150920-1-1024x576.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/20160816_150920-1-800x450.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/20160816_150920-1-1200x675-cropped.jpg 1200w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-16215\" class=\"wp-caption-text\">Having so much fun!<\/figcaption><\/figure>\n<p>A good example of this occurred\u00a0last week. I just finished a library for the <a href=\"https:\/\/digilent.com\/shop\/pmodssd-seven-segment-display\/\">PmodSSD<\/a>, which is a 2 digit seven segment display. This Pmod\u00a0utilizes 12 pins. Pins 1 through 7 each light up a single segment on the display, while pin 8 switches between the left and right digit. This display can only light up one digit at a time, so in order to simulate a 2 digit number it needs to flash the numbers on both sides fast enough so that the human eye can see\u00a0both numbers at once.<\/p>\n<p>Here is what I came up with:<\/p>\n<blockquote><p><code>void SnakePattern(){<br \/>\n\/\/ start timer<br \/>\nlong startTimer = counter;<br \/>\nwhile(startTimer + displayTime &gt; counter){<br \/>\n\/\/ select left digit<br \/>\ndigitalWrite(pinArray[7], HIGH);<br \/>\n\/\/ print snake at segment A of left digit<br \/>\ndigitalWrite(pinArray[0], HIGH);<br \/>\ndigitalWrite(pinArray[1], LOW);<br \/>\ndigitalWrite(pinArray[2], LOW);<br \/>\ndigitalWrite(pinArray[3], LOW);<br \/>\ndigitalWrite(pinArray[4], LOW);<br \/>\ndigitalWrite(pinArray[5], LOW);<br \/>\ndigitalWrite(pinArray[6], LOW);<br \/>\ndelay(1);<\/code><\/p>\n<p>\/\/ select right digit<br \/>\ndigitalWrite(pinArray[7], LOW);<br \/>\n\/\/ print snake at segment A of right digit<br \/>\ndigitalWrite(pinArray[0], HIGH);<br \/>\ndigitalWrite(pinArray[1], LOW);<br \/>\ndigitalWrite(pinArray[2], LOW);<br \/>\ndigitalWrite(pinArray[3], LOW);<br \/>\ndigitalWrite(pinArray[4], LOW);<br \/>\ndigitalWrite(pinArray[5], LOW);<br \/>\ndigitalWrite(pinArray[6], LOW);<br \/>\ndelay(1);<br \/>\n}<br \/>\nstartTimer = counter;<br \/>\nwhile(startTimer + displayTime &gt; counter){<br \/>\n\/\/ select left digit<br \/>\ndigitalWrite(pinArray[7], LOW);<br \/>\n\/\/ print snake at segment B right digit<br \/>\ndigitalWrite(pinArray[0], LOW);<br \/>\ndigitalWrite(pinArray[1], HIGH);<br \/>\ndigitalWrite(pinArray[2], LOW);<br \/>\ndigitalWrite(pinArray[3], LOW);<br \/>\ndigitalWrite(pinArray[4], LOW);<br \/>\ndigitalWrite(pinArray[5], LOW);<br \/>\ndigitalWrite(pinArray[6], LOW);<br \/>\ndelay(1);<\/p>\n<p>\/\/ This continues on and on until pattern is done. It is a lot of lines.<\/p><\/blockquote>\n<p>My library was very simple, as you can see above. Basically, it takes a number, matches it to a case in a switch statement, and that case performs 7 digitalWrites() to display that number on the <a href=\"https:\/\/digilent.com\/shop\/pmodssd-seven-segment-display\/\">PmodSSD<\/a>. This function worked, and I was about to publish it.<\/p>\n<p>However,\u00a0I followed my lesson and decided to have some fun! Numbers are boring, I wanted to make some extravagant patterns on the display. So I set off to simulate a pattern of a snake circling around the display.<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" width=\"735\" height=\"551\" src=\"https:\/\/www.youtube.com\/embed\/SmOW49avxeU?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/div>\n<p>I coded this pattern the same way I coded the numbers being displayed, by individually telling pins 1 to 7 to be HIGH or LOW. As you can imagine, this requires A LOT of lines of code, and therefore a lot of screen scrolling. Without wanting to make this pattern, I wouldn&#8217;t have known just how wasteful my code was. To make it more efficient, I fit all\u00a07 lines of digitalWrite()&#8217;s into a single binary array.<\/p>\n<blockquote><p><code><br \/>\nvoid DisplayPattern(int binArray1[7], int binArray1[7]){<br \/>\n\/\/ grab current time from timer to start countdown<br \/>\nlong startTimer = counter;<br \/>\nwhile(startTimer + displayTime &gt; counter){<br \/>\n\/\/ start backwards so that the digit selection is written to first<br \/>\nfor(int i = 7; i &gt;= 0; i--){<br \/>\nif(binArray1[i]== 1){<br \/>\ndigitalWrite(pinArray[i], HIGH);<br \/>\n} else {<br \/>\ndigitalWrite(pinArray[i], LOW);<br \/>\n}<br \/>\n}<br \/>\nfor(int i = 7; i &gt;= 0; i--){<br \/>\nif(binArray2[i]== 1){<br \/>\ndigitalWrite(pinArray[i], HIGH);<br \/>\n} else {<br \/>\ndigitalWrite(pinArray[i], LOW);<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<\/code><\/p>\n<p>void SnakePattern(){<br \/>\n\/\/ print snake at segment A of left digit<br \/>\nint snakeArray1[] = {1, 0, 0, 0, 0, 0, 0, 1};<br \/>\nint snakeArray2[] = {0, 0, 0, 0, 0, 0, 0, 0};<br \/>\nDisplayBinnaryArray(snakeArray1, snakeArray1);<br \/>\ndelay(1);<\/p>\n<p>\/\/ print snake at segment A of right digit<br \/>\nint snakeArray1[] = {0, 0, 0, 0, 0, 0, 0, 1};<br \/>\nint snakeArray2[] = {1, 0, 0, 0, 0, 0, 0, 0};<br \/>\nDisplayBinnaryArray(snakeArray1, snakeArray1);<\/p>\n<p>\/\/ print snake at segment B of right digit<br \/>\nint snakeArray1[] = {0, 0, 0, 0, 0, 0, 0, 1};<br \/>\nint snakeArray2[] = {0, 1, 0, 0, 0, 0, 0, 0};<br \/>\nDisplayBinnaryArray(snakeArray1, snakeArray1);<\/p>\n<p>\/\/ print snake at segment C of right digit<br \/>\nint snakeArray1[] = {0, 0, 0, 0, 0, 0, 0, 1};<br \/>\nint snakeArray2[] = {0, 0, 1, 0, 0, 0, 0, 0};<br \/>\nDisplayBinnaryArray(snakeArray1, snakeArray1);<\/p>\n<p>\/\/ print snake at segment D of right digit<br \/>\nint snakeArray1[] = {0, 0, 0, 0, 0, 0, 0, 1};<br \/>\nint snakeArray2[] = {0, 0, 0, 1, 0, 0, 0, 0};<br \/>\nDisplayBinnaryArray(snakeArray1, snakeArray1);<\/p>\n<p>\/\/ continues<\/p><\/blockquote>\n<p>This solution trimmed down a lot of lines of code. However, it could be reduced even more. Instead of passing a binary array, I wrote a function that takes\u00a0a number between 0 and 255, interprets it as a binary array, and displays that pattern on the <a href=\"https:\/\/digilent.com\/shop\/pmodssd-seven-segment-display\/\">PmodSSD<\/a>. This took my previous solution, and pushed it into one simple integer. Now I could easily write whole patterns in just one array of bytes.<\/p>\n<blockquote><p><code>void DisplayByte(int byte){<br \/>\nif(byte &lt; 0 || byte &gt; 255){<br \/>\nreturn;<br \/>\n}<br \/>\nint mask = 1 &lt;&lt; (7); for(int x = 7; x &gt;= 0; x--){<br \/>\nif( (byte &amp; mask) == 0 ){<br \/>\ndigitalWrite(pinArray[x], LOW);<br \/>\n}else{<br \/>\ndigitalWrite(pinArray[x], HIGH);<br \/>\n}<br \/>\nmask &gt;&gt;= 1;<br \/>\n}<br \/>\ndelay(1);<br \/>\n}<\/code><\/p>\n<p>void DisplayArrayOfBytes(int ByteArray[], long displayTime){<br \/>\n\/\/ grab current time from timer to start countdown<br \/>\nlong startTimer;<br \/>\nint i = 0;<br \/>\nwhile(ByteArray[i]!= -1){<br \/>\nstartTimer = counter;<br \/>\nwhile(startTimer + displayTime &gt; counter){<br \/>\nDisplayByte(ByteArray[i]);<br \/>\n\/\/ wait a bit<\/p>\n<p>DisplayByte(ByteArray[i+1]);<br \/>\n\/\/ wait a bit<br \/>\n}<br \/>\ni += 2;<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/ Send DisplayByte an array of bytes containing a snake pattern<br \/>\nvoid SnakePattern(){<br \/>\nint circleAnimation[15] = {129, 1, 128, 3, 128, 6, 128, 12, 136, 8, 152, 0, 176, 0, -1};<br \/>\nDisplayBinnaryArray(circleAnimation);<br \/>\n}<\/p><\/blockquote>\n<p>What originally took 26 lines of code could now fit into just 2 lines of code! My library now seemed to be at its most optimal. Without creating a fun side project with my library, I wouldn&#8217;t know how much more improved it could be.<\/p>\n<p>Of course, most\u00a0anything\u00a0could always be more optimal. If you have any ideas improving my code, leave a comment below! Keep in mind that this is not the actual code in the library, which you can find <a href=\"https:\/\/digilent.com\/reference\/pmod\/pmodssd\/start?redirect=1id=pmod\/pmod\/ssd\">here<\/a>, but a representation of the idea behind its design. Now that my library is published, I went a bit crazy with the patterns&#8230;<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" width=\"735\" height=\"413\" src=\"https:\/\/www.youtube.com\/embed\/FkAk9LGnCLM?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/div>\n<p>I hope this provided some insight on the creation of libraries, as well as the importance of doing projects to test out what you come up with!<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-16205 jlk' data-task='like' data-post_id='16205' data-nonce='712f7a0d3d' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-16205 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-16205 jlk' data-task='unlike' data-post_id='16205' data-nonce='712f7a0d3d' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-16205 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-16205 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Check out a fun Pmod project using the PmodSSD display, and learn a bit about the basics of writing libraries!<\/p>\n","protected":false},"author":45,"featured_media":16233,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false,"_ppma_block_editor_authors":""},"categories":[38,1561],"tags":[104],"ppma_author":[4495],"class_list":["post-16205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-expansion-modules","category-applications","tag-project-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FUNdamentals of Writing a Library - Digilent Blog<\/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:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FUNdamentals of Writing a Library - Digilent Blog\" \/>\n<meta property=\"og:description\" content=\"Check out a fun Pmod project using the PmodSSD display, and learn a bit about the basics of writing libraries!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Digilent Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-25T17:00:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-16T20:56:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png\" \/>\n\t<meta property=\"og:image:width\" content=\"533\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Eric Marsh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eric Marsh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/\"},\"author\":{\"name\":\"Eric Marsh\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/#\\\/schema\\\/person\\\/5e55f823966f5652ac650fada2e4f7b4\"},\"headline\":\"FUNdamentals of Writing a Library\",\"datePublished\":\"2016-08-25T17:00:03+00:00\",\"dateModified\":\"2021-06-16T20:56:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/\"},\"wordCount\":797,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/digilent.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/boom-zaam-zoom.png\",\"keywords\":[\"project\"],\"articleSection\":[\"Digilent Expansion Modules\",\"Product Applications \u2013 Digilent Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/\",\"url\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/\",\"name\":\"FUNdamentals of Writing a Library - Digilent Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/digilent.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/boom-zaam-zoom.png\",\"datePublished\":\"2016-08-25T17:00:03+00:00\",\"dateModified\":\"2021-06-16T20:56:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/#\\\/schema\\\/person\\\/5e55f823966f5652ac650fada2e4f7b4\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#primaryimage\",\"url\":\"https:\\\/\\\/digilent.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/boom-zaam-zoom.png\",\"contentUrl\":\"https:\\\/\\\/digilent.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/boom-zaam-zoom.png\",\"width\":533,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/fundementals-of-writing-a-library\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/digilent.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FUNdamentals of Writing a Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/digilent.com\\\/blog\\\/\",\"name\":\"Digilent Blog\",\"description\":\"Learning for Engineers, Students, and Hobbyists\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/digilent.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/digilent.com\\\/blog\\\/#\\\/schema\\\/person\\\/5e55f823966f5652ac650fada2e4f7b4\",\"name\":\"Eric Marsh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=gd5eda847a8aa60824bf61e50c67e4a63\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=g\",\"caption\":\"Eric Marsh\"},\"url\":\"https:\\\/\\\/digilent.com\\\/blog\\\/author\\\/emarsh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FUNdamentals of Writing a Library - Digilent Blog","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:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/","og_locale":"en_US","og_type":"article","og_title":"FUNdamentals of Writing a Library - Digilent Blog","og_description":"Check out a fun Pmod project using the PmodSSD display, and learn a bit about the basics of writing libraries!","og_url":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/","og_site_name":"Digilent Blog","article_published_time":"2016-08-25T17:00:03+00:00","article_modified_time":"2021-06-16T20:56:44+00:00","og_image":[{"width":533,"height":350,"url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png","type":"image\/png"}],"author":"Eric Marsh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Eric Marsh","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#article","isPartOf":{"@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/"},"author":{"name":"Eric Marsh","@id":"https:\/\/digilent.com\/blog\/#\/schema\/person\/5e55f823966f5652ac650fada2e4f7b4"},"headline":"FUNdamentals of Writing a Library","datePublished":"2016-08-25T17:00:03+00:00","dateModified":"2021-06-16T20:56:44+00:00","mainEntityOfPage":{"@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/"},"wordCount":797,"commentCount":0,"image":{"@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#primaryimage"},"thumbnailUrl":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png","keywords":["project"],"articleSection":["Digilent Expansion Modules","Product Applications \u2013 Digilent Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/","url":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/","name":"FUNdamentals of Writing a Library - Digilent Blog","isPartOf":{"@id":"https:\/\/digilent.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#primaryimage"},"image":{"@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#primaryimage"},"thumbnailUrl":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png","datePublished":"2016-08-25T17:00:03+00:00","dateModified":"2021-06-16T20:56:44+00:00","author":{"@id":"https:\/\/digilent.com\/blog\/#\/schema\/person\/5e55f823966f5652ac650fada2e4f7b4"},"breadcrumb":{"@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#primaryimage","url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png","contentUrl":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png","width":533,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/digilent.com\/blog\/fundementals-of-writing-a-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/digilent.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FUNdamentals of Writing a Library"}]},{"@type":"WebSite","@id":"https:\/\/digilent.com\/blog\/#website","url":"https:\/\/digilent.com\/blog\/","name":"Digilent Blog","description":"Learning for Engineers, Students, and Hobbyists","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/digilent.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/digilent.com\/blog\/#\/schema\/person\/5e55f823966f5652ac650fada2e4f7b4","name":"Eric Marsh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=gd5eda847a8aa60824bf61e50c67e4a63","url":"https:\/\/secure.gravatar.com\/avatar\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=g","caption":"Eric Marsh"},"url":"https:\/\/digilent.com\/blog\/author\/emarsh\/"}]}},"jetpack_sharing_enabled":true,"authors":[{"term_id":4495,"user_id":45,"is_guest":0,"slug":"emarsh","display_name":"Eric Marsh","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/d65ca3ee4750fc49bf338630709f4b7073fb08e524f159a6c4ee6f0b900b96e9?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Marsh","last_name_2":"","first_name":"Eric","first_name_2":"","job_title":"","description":""}],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/08\/boom-zaam-zoom.png","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/16205","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\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=16205"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/16205\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/16233"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=16205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=16205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=16205"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=16205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}