{"id":4849,"date":"2013-06-28T20:22:56","date_gmt":"2013-06-28T20:22:56","guid":{"rendered":"http:\/\/178.62.14.192\/?p=4849"},"modified":"2018-03-12T22:45:47","modified_gmt":"2018-03-12T21:45:47","slug":"i2c-20x4-lcd-character-display-on-a-raspberrypi","status":"publish","type":"post","link":"https:\/\/www.recantha.co.uk\/blog\/?p=4849","title":{"rendered":"I2C 20&#215;4 LCD character display on a #RaspberryPi"},"content":{"rendered":"<p><strong><em><a href=\"https:\/\/www.recantha.co.uk\/blog\/?p=18467\">Take a look at this more up-to-date post<\/a> which uses a Python library to do the necessary.<\/em><\/strong><\/p>\n<p>I bought <a href=\"http:\/\/hobbycomponents.com\/displays\/223-i2c-2004-serial-20-x-4-lcd-module\" target=\"_blank\" rel=\"noopener\">this display from Hobby Components<\/a>:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/i0.wp.com\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg?resize=560%2C560\" alt=\"\" width=\"560\" height=\"560\" \/><\/p>\n<p>It is very similar to the Sainsmart 2004 LCD display and the pin mappings are the same (it&#8217;s a J204A LCD board).<\/p>\n<p>I came across this <a href=\"http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?f=32&amp;t=34261&amp;p=378524\">thread on the Foundation forum<\/a>\u00a0on which member &#8216;natbett&#8217; gave out some code to drive the display. Fortunately, this code works (after trying out 4 other examples found elsewhere). Here is the code for posterity:<\/p>\n<p>The first file is called &#8216;i2c_lib.py&#8217;<\/p>\n<pre>import smbus\r\nfrom time import *\r\n\r\nclass i2c_device:\r\n   def __init__(self, addr, port=1):\r\n      self.addr = addr\r\n      self.bus = smbus.SMBus(port)\r\n\r\n# Write a single command\r\n   def write_cmd(self, cmd):\r\n      self.bus.write_byte(self.addr, cmd)\r\n      sleep(0.0001)\r\n\r\n# Write a command and argument\r\n   def write_cmd_arg(self, cmd, data):\r\n      self.bus.write_byte_data(self.addr, cmd, data)\r\n      sleep(0.0001)\r\n\r\n# Write a block of data\r\n   def write_block_data(self, cmd, data):\r\n      self.bus.write_block_data(self.addr, cmd, data)\r\n      sleep(0.0001)\r\n\r\n# Read a single byte\r\n   def read(self):\r\n      return self.bus.read_byte(self.addr)\r\n\r\n# Read\r\n   def read_data(self, cmd):\r\n      return self.bus.read_byte_data(self.addr, cmd)\r\n\r\n# Read a block of data\r\n   def read_block_data(self, cmd):\r\n      return self.bus.read_block_data(self.addr, cmd)<\/pre>\n<p>The second file is called lcddriver.py<\/p>\n<pre>import i2c_lib\r\nfrom time import *\r\n\r\n# LCD Address\r\nADDRESS = 0x27\r\n\r\n# commands\r\nLCD_CLEARDISPLAY = 0x01\r\nLCD_RETURNHOME = 0x02\r\nLCD_ENTRYMODESET = 0x04\r\nLCD_DISPLAYCONTROL = 0x08\r\nLCD_CURSORSHIFT = 0x10\r\nLCD_FUNCTIONSET = 0x20\r\nLCD_SETCGRAMADDR = 0x40\r\nLCD_SETDDRAMADDR = 0x80\r\n\r\n# flags for display entry mode\r\nLCD_ENTRYRIGHT = 0x00\r\nLCD_ENTRYLEFT = 0x02\r\nLCD_ENTRYSHIFTINCREMENT = 0x01\r\nLCD_ENTRYSHIFTDECREMENT = 0x00\r\n\r\n# flags for display on\/off control\r\nLCD_DISPLAYON = 0x04\r\nLCD_DISPLAYOFF = 0x00\r\nLCD_CURSORON = 0x02\r\nLCD_CURSOROFF = 0x00\r\nLCD_BLINKON = 0x01\r\nLCD_BLINKOFF = 0x00\r\n\r\n# flags for display\/cursor shift\r\nLCD_DISPLAYMOVE = 0x08\r\nLCD_CURSORMOVE = 0x00\r\nLCD_MOVERIGHT = 0x04\r\nLCD_MOVELEFT = 0x00\r\n\r\n# flags for function set\r\nLCD_8BITMODE = 0x10\r\nLCD_4BITMODE = 0x00\r\nLCD_2LINE = 0x08\r\nLCD_1LINE = 0x00\r\nLCD_5x10DOTS = 0x04\r\nLCD_5x8DOTS = 0x00\r\n\r\n# flags for backlight control\r\nLCD_BACKLIGHT = 0x08\r\nLCD_NOBACKLIGHT = 0x00\r\n\r\nEn = 0b00000100 # Enable bit\r\nRw = 0b00000010 # Read\/Write bit\r\nRs = 0b00000001 # Register select bit\r\n\r\nclass lcd:\r\n   #initializes objects and lcd\r\n   def __init__(self):\r\n      self.lcd_device = i2c_lib.i2c_device(ADDRESS)\r\n\r\n      self.lcd_write(0x03)\r\n      self.lcd_write(0x03)\r\n      self.lcd_write(0x03)\r\n      self.lcd_write(0x02)\r\n\r\n      self.lcd_write(LCD_FUNCTIONSET | LCD_2LINE | LCD_5x8DOTS | LCD_4BITMODE)\r\n      self.lcd_write(LCD_DISPLAYCONTROL | LCD_DISPLAYON)\r\n      self.lcd_write(LCD_CLEARDISPLAY)\r\n      self.lcd_write(LCD_ENTRYMODESET | LCD_ENTRYLEFT)\r\n      sleep(0.2)\r\n\r\n   # clocks EN to latch command\r\n   def lcd_strobe(self, data):\r\n      self.lcd_device.write_cmd(data | En | LCD_BACKLIGHT)\r\n      sleep(.0005)\r\n      self.lcd_device.write_cmd(((data &amp; ~En) | LCD_BACKLIGHT))\r\n      sleep(.0001)\r\n\r\n   def lcd_write_four_bits(self, data):\r\n      self.lcd_device.write_cmd(data | LCD_BACKLIGHT)\r\n      self.lcd_strobe(data)\r\n\r\n   # write a command to lcd\r\n   def lcd_write(self, cmd, mode=0):\r\n      self.lcd_write_four_bits(mode | (cmd &amp; 0xF0))\r\n      self.lcd_write_four_bits(mode | ((cmd &lt;&lt; 4) &amp; 0xF0))\r\n\r\n   # put string function\r\n   def lcd_display_string(self, string, line):\r\n      if line == 1:\r\n         self.lcd_write(0x80)\r\n      if line == 2:\r\n         self.lcd_write(0xC0)\r\n      if line == 3:\r\n         self.lcd_write(0x94)\r\n      if line == 4:\r\n         self.lcd_write(0xD4)\r\n\r\n      for char in string:\r\n         self.lcd_write(ord(char), Rs)\r\n\r\n   # clear lcd and set to home\r\n   def lcd_clear(self):\r\n      self.lcd_write(LCD_CLEARDISPLAY)\r\n      self.lcd_write(LCD_RETURNHOME)\r\n<\/pre>\n<p>The last file, which is the example script, is called lcd.py<\/p>\n<pre>import lcddriver\r\nfrom time import *\r\n\r\nlcd = lcddriver.lcd()\r\n\r\nlcd.lcd_display_string(\"Hello world\", 1)\r\nlcd.lcd_display_string(\"My name is\", 2)\r\nlcd.lcd_display_string(\"picorder\", 3)\r\nlcd.lcd_display_string(\"I am a Raspberry Pi\", 4)\r\n<\/pre>\n<p>It displays 4 lines of text.<\/p>\n<p>My next task is to connect this up to the Picorder version 3!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Take a look at this more up-to-date post which uses a Python library to do the necessary. I bought this display from Hobby Components: It is very similar to the Sainsmart 2004 LCD display and the pin mappings are the&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\">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":[20,37,39],"tags":[],"class_list":["post-4849","post","type-post","status-publish","format-standard","hentry","category-gpio-boards","category-picorder","category-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>I2C 20x4 LCD character display on a #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=4849\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"I2C 20x4 LCD character display on a #RaspberryPi - Raspberry Pi Pod\" \/>\n<meta property=\"og:description\" content=\"Take a look at this more up-to-date post which uses a Python library to do the necessary. I bought this display from Hobby Components: It is very similar to the Sainsmart 2004 LCD display and the pin mappings are the&hellip;Read more &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\" \/>\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-06-28T20:22:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-12T21:45:47+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg\" \/>\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=\"3 minutes\" \/>\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=4849#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\"},\"author\":{\"name\":\"Michael Horne\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\"},\"headline\":\"I2C 20&#215;4 LCD character display on a #RaspberryPi\",\"datePublished\":\"2013-06-28T20:22:56+00:00\",\"dateModified\":\"2018-03-12T21:45:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\"},\"wordCount\":139,\"commentCount\":119,\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage\"},\"thumbnailUrl\":\"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg\",\"articleSection\":[\"GPIO boards\",\"Picorder\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\",\"name\":\"I2C 20x4 LCD character display on a #RaspberryPi - Raspberry Pi Pod\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage\"},\"thumbnailUrl\":\"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg\",\"datePublished\":\"2013-06-28T20:22:56+00:00\",\"dateModified\":\"2018-03-12T21:45:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=4849\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage\",\"url\":\"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg\",\"contentUrl\":\"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=4849#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.recantha.co.uk\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"I2C 20&#215;4 LCD character display on a #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":"I2C 20x4 LCD character display on a #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=4849","og_locale":"en_US","og_type":"article","og_title":"I2C 20x4 LCD character display on a #RaspberryPi - Raspberry Pi Pod","og_description":"Take a look at this more up-to-date post which uses a Python library to do the necessary. I bought this display from Hobby Components: It is very similar to the Sainsmart 2004 LCD display and the pin mappings are the&hellip;Read more &rarr;","og_url":"https:\/\/www.recantha.co.uk\/blog\/?p=4849","og_site_name":"Raspberry Pi Pod","article_publisher":"https:\/\/www.facebook.com\/recantha\/","article_published_time":"2013-06-28T20:22:56+00:00","article_modified_time":"2018-03-12T21:45:47+00:00","og_image":[{"url":"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg","type":"","width":"","height":""}],"author":"Michael Horne","twitter_card":"summary_large_image","twitter_creator":"@recantha","twitter_site":"@recantha","twitter_misc":{"Written by":"Michael Horne","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#article","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849"},"author":{"name":"Michael Horne","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263"},"headline":"I2C 20&#215;4 LCD character display on a #RaspberryPi","datePublished":"2013-06-28T20:22:56+00:00","dateModified":"2018-03-12T21:45:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849"},"wordCount":139,"commentCount":119,"publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage"},"thumbnailUrl":"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg","articleSection":["GPIO boards","Picorder","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.recantha.co.uk\/blog\/?p=4849#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849","url":"https:\/\/www.recantha.co.uk\/blog\/?p=4849","name":"I2C 20x4 LCD character display on a #RaspberryPi - Raspberry Pi Pod","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage"},"thumbnailUrl":"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg","datePublished":"2013-06-28T20:22:56+00:00","dateModified":"2018-03-12T21:45:47+00:00","breadcrumb":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.recantha.co.uk\/blog\/?p=4849"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#primaryimage","url":"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg","contentUrl":"http:\/\/hobbycomponents.com\/1497-thickbox_default\/i2c-2004-serial-20-x-4-lcd-module.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=4849#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.recantha.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"I2C 20&#215;4 LCD character display on a #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-1gd","jetpack-related-posts":[{"id":18467,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=18467","url_meta":{"origin":4849,"position":0},"title":"Getting an HD44780 16&#215;2 LCD working on the Raspberry Pi &#8211; a tutorial","author":"Michael Horne","date":"11 March 2018","format":false,"excerpt":"This post is all about\u00a0HD44780 LCD screens and how to use them in your projects. I've recently been thinking about what my next project will be. I've previously experimented with handheld enclosures such as these ones: and I wanted to do another handheld device. So, I took a look around\u2026","rel":"","context":"In &quot;Accessories&quot;","block_context":{"text":"Accessories","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=54"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/16x2_front_sm.jpg?fit=1200%2C587&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/16x2_front_sm.jpg?fit=1200%2C587&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/16x2_front_sm.jpg?fit=1200%2C587&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/16x2_front_sm.jpg?fit=1200%2C587&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/16x2_front_sm.jpg?fit=1200%2C587&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":10916,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=10916","url_meta":{"origin":4849,"position":1},"title":"Temperature display with a Raspberry Pi and Nokia LCD","author":"Michael Horne","date":"2 September 2014","format":false,"excerpt":"Bart Bania has taken a Pi, a Nokia 5110 LCD screen and a one-wire temperature sensor, mashed them together and created a nice little temperature sensor. You can see circuit diagrams and get access to the code by visiting his blog.","rel":"","context":"In &quot;Accessories&quot;","block_context":{"text":"Accessories","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=54"},"img":{"alt_text":"","src":"http:\/\/i2.wp.com\/www.bartbania.com\/wp-content\/uploads\/2013\/09\/lcd2.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7085,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=7085","url_meta":{"origin":4849,"position":2},"title":"Wearable computer with motorized, retracting eye display powered by #RaspberryPi","author":"Michael Horne","date":"21 November 2013","format":false,"excerpt":"The Code Ninja has heavily modified a Raspberry Pi (and I do mean\u00a0heavily) and attached a tiny LCD display to an arm that hovers in front of your eye. A servo system is able to push the display away from your eye and swivel it up. It's a great project,\u2026","rel":"","context":"In &quot;Making&quot;","block_context":{"text":"Making","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=50"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3005,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=3005","url_meta":{"origin":4849,"position":3},"title":"A #RaspberryPi car radio","author":"Michael Horne","date":"19 March 2013","format":false,"excerpt":"Daniele Nicassio has been busy building a radio for his car from a Raspberry Pi, an LCD display and a set of USB speakers. He's written a bare-bones tutorial with code examples.\u00a0Read more here.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=39"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14450,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=14450","url_meta":{"origin":4849,"position":4},"title":"Using the DHT11 humidity\/temperature sensor with the Raspberry Pi","author":"Michael Horne","date":"2 April 2016","format":false,"excerpt":"The DHT11 temperature and humidity sensor is an inexpensive sensor. It has a +\/- 2 degree variance, so it's not suitable for high-precision use-cases (for that you need the DHT22). Over at Circuit Basics, they've written a tutorial which will get you started with the sensor. They've included code for\u2026","rel":"","context":"In &quot;Sensors&quot;","block_context":{"text":"Sensors","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=62"},"img":{"alt_text":"","src":"http:\/\/i2.wp.com\/www.circuitbasics.com\/wp-content\/uploads\/2015\/12\/How-to-Set-Up-the-DHT11-Humidity-Sensor-on-the-Raspberry-Pi-DHT11-Output-to-LCD.jpg?resize=350%2C200","width":350,"height":200,"srcset":"http:\/\/i2.wp.com\/www.circuitbasics.com\/wp-content\/uploads\/2015\/12\/How-to-Set-Up-the-DHT11-Humidity-Sensor-on-the-Raspberry-Pi-DHT11-Output-to-LCD.jpg?resize=350%2C200 1x, http:\/\/i2.wp.com\/www.circuitbasics.com\/wp-content\/uploads\/2015\/12\/How-to-Set-Up-the-DHT11-Humidity-Sensor-on-the-Raspberry-Pi-DHT11-Output-to-LCD.jpg?resize=525%2C300 1.5x, http:\/\/i2.wp.com\/www.circuitbasics.com\/wp-content\/uploads\/2015\/12\/How-to-Set-Up-the-DHT11-Humidity-Sensor-on-the-Raspberry-Pi-DHT11-Output-to-LCD.jpg?resize=700%2C400 2x, http:\/\/i2.wp.com\/www.circuitbasics.com\/wp-content\/uploads\/2015\/12\/How-to-Set-Up-the-DHT11-Humidity-Sensor-on-the-Raspberry-Pi-DHT11-Output-to-LCD.jpg?resize=1050%2C600 3x, http:\/\/i2.wp.com\/www.circuitbasics.com\/wp-content\/uploads\/2015\/12\/How-to-Set-Up-the-DHT11-Humidity-Sensor-on-the-Raspberry-Pi-DHT11-Output-to-LCD.jpg?resize=1400%2C800 4x"},"classes":[]},{"id":13943,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=13943","url_meta":{"origin":4849,"position":5},"title":"RasPiO Duino LCD kit &#8211; review","author":"Michael Horne","date":"24 December 2015","format":false,"excerpt":"Alex was kind enough to send me one of these kits but I'm free to say what I like. This kit is all about learning how to display data onto an LCD screen from analog temperature sensors. The basic kit contains the following: a 20\u00d74 LCD with blue backlight and\u2026","rel":"","context":"In &quot;Accessories&quot;","block_context":{"text":"Accessories","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=54"},"img":{"alt_text":"","src":"https:\/\/lh3.googleusercontent.com\/3AQ-rokngOgBjNKwOrDfsCOdWXFCYpgXI-ubhLaS4OAl3nVk53AmbtApcF949DnVhinUZvk2xv_Y=w845-h634-no","width":350,"height":200,"srcset":"https:\/\/lh3.googleusercontent.com\/3AQ-rokngOgBjNKwOrDfsCOdWXFCYpgXI-ubhLaS4OAl3nVk53AmbtApcF949DnVhinUZvk2xv_Y=w845-h634-no 1x, https:\/\/lh3.googleusercontent.com\/3AQ-rokngOgBjNKwOrDfsCOdWXFCYpgXI-ubhLaS4OAl3nVk53AmbtApcF949DnVhinUZvk2xv_Y=w845-h634-no 1.5x, https:\/\/lh3.googleusercontent.com\/3AQ-rokngOgBjNKwOrDfsCOdWXFCYpgXI-ubhLaS4OAl3nVk53AmbtApcF949DnVhinUZvk2xv_Y=w845-h634-no 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4849","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=4849"}],"version-history":[{"count":3,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4849\/revisions"}],"predecessor-version":[{"id":18487,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4849\/revisions\/18487"}],"wp:attachment":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}