{"id":345,"date":"2018-12-27T16:24:06","date_gmt":"2018-12-27T16:24:06","guid":{"rendered":"https:\/\/notiz.comanet.xyz\/?p=345"},"modified":"2019-03-03T19:42:29","modified_gmt":"2019-03-03T18:42:29","slug":"displayapp-for-rpi3-and-waveshare-1-5-oled","status":"publish","type":"post","link":"https:\/\/notiz.comanet.xyz\/?p=345","title":{"rendered":"DisplayApp for RPI3 and Waveshare 1.5 OLED"},"content":{"rendered":"<p> \tThis is a small application that displays statistics and status iformation to a Waveshare 1.5&quot; OLED screen connected to Raspberry Pi 3 via SPI. Developed with Python 2 but it should run on Python3 as well.<\/p>\n<p> \t<a href=\"https:\/\/camo.githubusercontent.com\/89e1949d73b4ea57fb84704fe62968b546417814\/68747470733a2f2f692e696d6775722e636f6d2f384d7a7a72365a2e706e67\" rel=\"noopener noreferrer\" target=\"_blank\"><img decoding=\"async\" alt=\"img1\" data-canonical-src=\"https:\/\/i.imgur.com\/8Mzzr6Z.png\" src=\"https:\/\/camo.githubusercontent.com\/89e1949d73b4ea57fb84704fe62968b546417814\/68747470733a2f2f692e696d6775722e636f6d2f384d7a7a72365a2e706e67\" style=\"max-width:100%;\" \/><\/a> <a href=\"https:\/\/camo.githubusercontent.com\/aaffc7e6d78c10c59919e2490fb79fddf227eb36\/68747470733a2f2f692e696d6775722e636f6d2f396576544652522e706e67\" rel=\"noopener noreferrer\" target=\"_blank\"><img decoding=\"async\" alt=\"img2\" data-canonical-src=\"https:\/\/i.imgur.com\/9evTFRR.png\" src=\"https:\/\/camo.githubusercontent.com\/aaffc7e6d78c10c59919e2490fb79fddf227eb36\/68747470733a2f2f692e696d6775722e636f6d2f396576544652522e706e67\" style=\"max-width:100%;\" \/><\/a> <a href=\"https:\/\/camo.githubusercontent.com\/c6be5daf1a762ea1015af4ce5ef642cb06e11388\/68747470733a2f2f692e696d6775722e636f6d2f464862663655672e706e67\" rel=\"noopener noreferrer\" target=\"_blank\"><img decoding=\"async\" alt=\"img3\" data-canonical-src=\"https:\/\/i.imgur.com\/FHbf6Ug.png\" src=\"https:\/\/camo.githubusercontent.com\/c6be5daf1a762ea1015af4ce5ef642cb06e11388\/68747470733a2f2f692e696d6775722e636f6d2f464862663655672e706e67\" style=\"max-width:100%;\" \/><\/a> <a href=\"https:\/\/camo.githubusercontent.com\/4da0e7d9b9a8e9519cee3a9254fbf31d43ae731a\/68747470733a2f2f692e696d6775722e636f6d2f64786d645a6a6b2e706e67\" rel=\"noopener noreferrer\" target=\"_blank\"><img decoding=\"async\" alt=\"img4\" data-canonical-src=\"https:\/\/i.imgur.com\/dxmdZjk.png\" src=\"https:\/\/camo.githubusercontent.com\/4da0e7d9b9a8e9519cee3a9254fbf31d43ae731a\/68747470733a2f2f692e696d6775722e636f6d2f64786d645a6a6b2e706e67\" style=\"max-width:100%;\" \/><\/a><\/p>\n<h3> \t<a aria-hidden=\"true\" class=\"anchor\" href=\"https:\/\/github.com\/SupremeC\/RPI_InfoScreen#prerequisites\" id=\"user-content-prerequisites\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" viewbox=\"0 0 16 16\" width=\"16\"><\/svg><\/a><\/h3>\n<h3> \tPrerequisites<\/h3>\n<ul>\n<li> \t\tRaspberry Pi<\/li>\n<li> \t\t<a href=\"https:\/\/www.waveshare.com\/1.5inch-OLED-Module.htm\" rel=\"nofollow\">Waveshare 1.5 inch OLED display<\/a> (grayscale)<\/li>\n<li> \t\tSPI or I2C enabled\n<ul>\n<li> \t\t\t\t<code>sudo raspi-config<\/code> -&gt; interfacing options -&gt; [enable SPI or I2C]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3> \t<a aria-hidden=\"true\" class=\"anchor\" href=\"https:\/\/github.com\/SupremeC\/RPI_InfoScreen#wiring\" id=\"user-content-wiring\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" viewbox=\"0 0 16 16\" width=\"16\"><\/svg><\/a><\/h3>\n<h3> \tWiring<\/h3>\n<ul>\n<li> \t\tWire up OLED display according to the SPI or I2C documentation for the Waveshare display.<\/li>\n<li> \t\tPower LED (red) is wired via a resistor to 5V.<\/li>\n<li> \t\tSystem LED (green) is wired to BCM PIN 26.<\/li>\n<li> \t\tActivity LED (orange) is wired to BCM PIN 6.<\/li>\n<\/ul>\n<h3> \t<a aria-hidden=\"true\" class=\"anchor\" href=\"https:\/\/github.com\/SupremeC\/RPI_InfoScreen#requires-these-modules\" id=\"user-content-requires-these-modules\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" viewbox=\"0 0 16 16\" width=\"16\"><\/svg><\/a><\/h3>\n<h3> \tRequires these modules:<\/h3>\n<ul>\n<li> \t\tpsutil<\/li>\n<li> \t\tPaho MQTT<\/li>\n<li> \t\tPILLOW<\/li>\n<\/ul>\n<h3> \t<a aria-hidden=\"true\" class=\"anchor\" href=\"https:\/\/github.com\/SupremeC\/RPI_InfoScreen#installation-this-application\" id=\"user-content-installation-this-application\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" viewbox=\"0 0 16 16\" width=\"16\"><\/svg><\/a><\/h3>\n<h3> \tInstallation this application<\/h3>\n<div class=\"highlight highlight-source-shell\">\n<pre>pip install psutil pip install paho-mqtt sudo apt-get install libjpeg-dev  <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> needed by pillow<\/span> pip install pillow pip install spidev sudo apt-get install python-smbus i2c-tools  <span class=\"pl-c1\">cd<\/span> \/home\/pi mkdir -p projects\/displayApp <span class=\"pl-c1\">cd<\/span> \/home\/pi\/projects wget https:\/\/github.com\/SupremeC\/RPI_InfoScreen\/archive\/master.zip unzip master.zip mv RPI_InfoScreen-master\/<span class=\"pl-k\">*<\/span> .\/displayApp rm -rf RPI_InfoScreen-master rm master.zip<\/pre>\n<\/p><\/div>\n<h3> \t<a aria-hidden=\"true\" class=\"anchor\" href=\"https:\/\/github.com\/SupremeC\/RPI_InfoScreen#how-to-use\" id=\"user-content-how-to-use\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" viewbox=\"0 0 16 16\" width=\"16\"><\/svg><\/a><\/h3>\n<h3> \tHow to use<\/h3>\n<ul>\n<li> \t\tTo manually start: <code>python info_screen.py<\/code><\/li>\n<li> \t\tTo clear the screen (for any reason): <code>python turn_off_screen.py<\/code><\/li>\n<li> \t\tTo manually trigger &#39;motion&#39; event: <code>mosquitto_pub -t home\/basement\/serverroom\/motionsensor -m motion<\/code><\/li>\n<\/ul>\n<h3> \t<a aria-hidden=\"true\" class=\"anchor\" href=\"https:\/\/github.com\/SupremeC\/RPI_InfoScreen#scheduling\" id=\"user-content-scheduling\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" viewbox=\"0 0 16 16\" width=\"16\"><\/svg><\/a><\/h3>\n<h3> \tScheduling<\/h3>\n<p> \tTODO<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a small application that displays statistics and status iformation to a Waveshare 1.5&quot; OLED screen connected to Raspberry Pi 3 via SPI. Developed with Python 2 but it should run on Python3 as well. Prerequisites Raspberry Pi Waveshare 1.5 inch OLED display (grayscale) SPI or I2C enabled sudo raspi-config -&gt; interfacing options -&gt;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-345","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=\/wp\/v2\/posts\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345"}],"version-history":[{"count":1,"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions"}],"predecessor-version":[{"id":361,"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions\/361"}],"wp:attachment":[{"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notiz.comanet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}