{"id":47897,"date":"2024-09-04T18:23:53","date_gmt":"2024-09-04T18:23:53","guid":{"rendered":"https:\/\/goodwriterz.com\/site\/?p=47897"},"modified":"2024-09-04T18:23:53","modified_gmt":"2024-09-04T18:23:53","slug":"build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything","status":"publish","type":"post","link":"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/","title":{"rendered":"Build an LED Indicator with a Raspberry Pi (for Email, Weather, or Anything)"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_68_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u062c\u062f\u0648\u0644 \u0627\u0644\u0645\u062d\u062a\u0648\u064a\u0627\u062a<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#Why_Do_I_Want_to_Do_This\" title=\"Why Do I Want to Do This?\">Why Do I Want to Do This?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#What_Do_I_Need\" title=\"What Do I Need?\">What Do I Need?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#Installing_the_LedBorg\" title=\"Installing the LedBorg\">Installing the LedBorg<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#Installing_the_LedBorg_Software\" title=\"Installing the LedBorg Software\">Installing the LedBorg Software<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#Configuring_Your_LedBorg_as_a_Rain_Indicator\" title=\"Configuring Your LedBorg as a Rain Indicator\">Configuring Your LedBorg as a Rain Indicator<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#Configuring_Your_LedBorg_as_a_Gmail_Indicator\" title=\"Configuring Your LedBorg as a Gmail Indicator\">Configuring Your LedBorg as a Gmail Indicator<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/#Setting_Up_a_Cron_Job_to_Run_Your_Script\" title=\"Setting Up a Cron Job to Run Your Script\">Setting Up a Cron Job to Run Your Script<\/a><\/li><\/ul><\/nav><\/div>\n<div>\n<p> The Raspberry Pi makes a nice compact platform to attach an indicator light to for all sorts of projects&#8212;weather notification, new emails, etc. Read on as we show you how to hook up an LED module to your Pi and set up some basic notifications. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":0,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":0,\"nbrPlacementsScanned\":0,\"ruleCount\":200,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":247} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":0,\"ruleCount\":200,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":200,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><br \/>\n<!-- No winning ad found for zone: below first paragraph! --><br \/>\n<!-- No winning ad found for zone: native in content! --><\/p>\n<h2 id=\"why-do-i-want-to-do-this\"><span class=\"ez-toc-section\" id=\"Why_Do_I_Want_to_Do_This\"><\/span> Why Do I Want to Do This? <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> Because it&#8217;s fun. Unlike many of our tutorials where we include a little blurb at the top outlining exactly what benefit you&#8217;ll derive from the project, the blurb is pretty short in this case because the benefit is simply having fun. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":235} --><\/p>\n<p> The Raspberry Pi is a perfect device to play around with, experiment with electronics, and learn some programming. Nobody needs an ambient rain indicator in their kitchen, for example, but building one is a fun exercise and a great reminder to bring your umbrella with you on potentially storm days. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":536} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":536} --><\/p>\n<h2 id=\"what-do-i-need\"><span class=\"ez-toc-section\" id=\"What_Do_I_Need\"><\/span> What Do I Need? <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> To follow along with out tutorial you&#8217;ll need a few things. First, we assume that you&#8217;ve already followed our previous tutorial: The HTG Guide to Getting Started with Raspberry Pi (and thus have a the basics covered up to installing Rasbian on our Raspberry Pi). <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":800} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":800,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":100,\"nextBlockCount\":485,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1285} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> If you&#8217;re looking to do this project on a budget, we can confidently tell you that the newest model Raspberry Pi is significant overkill for the job and we&#8217;d encourage you to blow the dust off an old Raspberry Pi you&#8217;ve got shoved in the closet or pick up a cheap used one off eBay or the like. Budget wise the long-in-the-tooth a Raspberry Pi 1 Model A \u00a0or Model B snagged off eBay for $10-15 is a perfect fit for this project over purchasing a brand new $35 current generation Pi. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":385} --><\/p>\n<p> In addition to having a functional Pi unit with Raspbian installed on it you&#8217;ll need the following things: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":493} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":700} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":700,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":200,\"nextBlockCount\":585,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1285} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Note: The clear\/frosted Pi case is entirely optional but if you&#8217;re currently using an opaque case then your LED indicator will be hidden inside. You&#8217;ll either need to cut a hole in your case to let the light out or use a GPIO extension cable with a breakout kit&#8212;like <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/adafruit.com\/products\/914\">this one from Adafruit Industries<\/a>&#8212;to tether the LedBorg to your Raspberry Pi. While using the breakout cable adds about $8 to the expense of the project it does offer more potential for customizing the end product in that you can more easily place the LED inside things or under something you want to illuminate. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":385} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":385} --><\/p>\n<h2 id=\"installing-the-ledborg\"><span class=\"ez-toc-section\" id=\"Installing_the_LedBorg\"><\/span> Installing the LedBorg <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"650\" height=\"300\" loading=\"lazy\" alt=\"2013-03-05_175859\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=650%2C300&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":625} --><\/p>\n<p> While you could certainly build yourself a completely-from-scratch LED indicator (and a search engine inquiry will turn up plenty of people who have done so) the Piborg organization produces such a compact and inexpensive LED module, the LedBorg, that we couldn&#8217;t resist using it as the basis for our Raspberry Pi LED indicator project. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":963} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Installing the module is a snap as it&#8217;s designed to fit directly over the GPIO pins on the Pi. First, power down your Pi and open the case. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":141} --><\/p>\n<p> The most important part of the installation process is that you orient the module so that the LedBorg icon is closest to the RCA module on the Raspberry Pi board (and thus the edge of the LedBorg is flush with the edges of the Pi board with the overhanging portion of the LedBorg hanging over the Pi board and not off the edge). See the photograph above. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":497} --><\/p>\n<p> While you have the Pi board open, now would be an excellent time to cover the on-board LED indicators (next to the USB ports), especially if you&#8217;re using a clear case. You don&#8217;t want it to be confusing to read your LedBorg indicator because the power and network indicator lights are so bright. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":793} --><\/p>\n<p> We covered ours with a layer of white electrical tape. This dimmed them enough so that we could still reference them but they were so much dimmer than the LedBorg it was no longer distracting. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":987} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Once you have the LedBorg installed and have, optionally, covered the Pi&#8217;s LED indicators with electrical tape, it&#8217;s time to close the case back up. Boot your Pi up before moving onto the next phase of the tutorial. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":217} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":217} --><\/p>\n<h2 id=\"installing-the-ledborg-software\"><span class=\"ez-toc-section\" id=\"Installing_the_LedBorg_Software\"><\/span> Installing the LedBorg Software <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"641\" height=\"234\" loading=\"lazy\" alt=\"2013-03-05_184355\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474230_456_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474230_456_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=641%2C234&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":457} --><\/p>\n<p> PiBorg provides a great software package for the LedBorg that includes both a GUI controller as well as drivers to access the LedBorg from the command line. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":615} --><\/p>\n<p> Before we get started you need to make sure you&#8217;re grabbing the right package for your version of Rasbian and the revision # of your Raspberry Pi board. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":769} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":769,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":131,\"nextBlockCount\":329,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1098} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> If your Raspberry Pi board has no mounting holes, it is Revision 1. If your Raspberry Pi has mounting holes (located by the USB ports and between the power and HDMI port) then it is Revision 2. You also need to know the kernel version of your Rasbian installation. Open up the terminal and enter the following command to check: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":198} --><\/p>\n<blockquote>\n<p> uname -r <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":218} --><\/p>\n<p> Once you have the Revision number and the kernel number, you can <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.piborg.com\/ledborg\/install\">visit the Packages section here<\/a> to grab the link for your package. In our case we&#8217;re using a Revision 1 board with the 3.6.11 kernel so we would grab the raspbian-2013-02-09-rev1.zip file. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":473} --><\/p>\n<p> In order to install all the goodies we need to open up the terminal on the Pi.\u00a0 and then input the following commands to install the LedBorg package. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":625} --><\/p>\n<p> Note: You must replace the URL in the third command with the URL of the package for your board\/kernel combination. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":741} --><\/p>\n<blockquote>\n<p> mkdir ~\/ledborg-setup <\/p>\n<p> cd ~\/ledborg-setup <\/p>\n<p> wget -O setup.zip  <\/p>\n<p> unzip setup.zip <\/p>\n<p> chmod +x install.sh <\/p>\n<p> .\/install.sh <\/p>\n<\/blockquote>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":974} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> At this point you now have the GUI wrapper for the LedBorg drivers and the drivers themselves installed. On your Raspbian desktop you&#8217;ll see an icon for the GUI wrapper: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":171} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"650\" height=\"250\" loading=\"lazy\" alt=\"2013-03-05_133940\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474230_354_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474230_354_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=650%2C250&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":411} --><\/p>\n<p> Go ahead and click on the LedBorg icon to launch the GUI wrapper. You will be treated to the color picker interface like so: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":537} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"474\" height=\"234\" loading=\"lazy\" alt=\"2013-03-05_134344\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474230_121_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474230_121_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=474%2C234&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":777} --><\/p>\n<p> Now is the perfect time to make sure your module is functional. Pick any color, save for black, to try it out. We are going to test it by picking a few colors: <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":938} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"650\" height=\"164\" loading=\"lazy\" alt=\"2013-03-05_184121\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_401_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_401_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=650%2C164&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":240} --><\/p>\n<p> Looks good! It&#8217;s bright and the frosted plastic of the case we ordered for the project offers moderate diffusion. If you want to play with the LED module more before moving on, click Demo Mode: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":435} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"474\" height=\"234\" loading=\"lazy\" alt=\"2013-03-05_134654\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_701_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_701_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=474%2C234&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":675} --><\/p>\n<p> In demo mode you can cycle through all the colors at various speeds, check out the high\/low output, and otherwise put the LED module through the paces. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":828} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":828,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":72,\"nextBlockCount\":408,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1236} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> It&#8217;s here in the Demo Mode section that you can also turn your LedBorg into the first of many indicators. By selecting CPU in the Colours section the LED will begin changing from green to yellow to red to indicate load on the Raspberry Pi&#8217;s ARM processor. We suggest changing the Speed to Slow while you&#8217;re at it&#8212;Fast updates the LED too quickly and makes the CPU indicator distracting instead of useful. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":336} --><\/p>\n<p> In addition to using the GUI interface to select colors you can pick colors from the terminal using RGB values. Open up the terminal and enter the following command to turn the LED off: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":523} --><\/p>\n<blockquote>\n<pre>\n<code class=\"hljs javascript\">echo \n<span class=\"hljs-string\">\"000\"<\/span>\n &gt; \n<span class=\"hljs-regexp\">\/dev\/<\/span>\nledborg<\/code>\n <\/pre>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":675} --><\/p>\n<p> The way the LedBorg handles RGB values is that 0 means the channel is off, 1 means the channel is half power, and 2 means the channel is full power. So for example 001 would set the Red channel at 0%, the Green channel at 0% and the Blue channel at 50% power. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":936} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Change the value to 002 and the LED output remains blue but becomes brighter because the Blue channel is now at 100% output. Change the value to 202 and the Red and Blue at full power combine to make a magenta color. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":218} --><\/p>\n<p> Now that we know how to manipulate the LED manually, let&#8217;s look at using scripts to turn our LED from a simple light to an actual indicator. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":360} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":360} --><\/p>\n<h2 id=\"configuring-your-ledborg-as-a-rain-indicator\"><span class=\"ez-toc-section\" id=\"Configuring_Your_LedBorg_as_a_Rain_Indicator\"><\/span> Configuring Your LedBorg as a Rain Indicator <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"650\" height=\"300\" loading=\"lazy\" alt=\"2013-03-05_184941\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_226_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_226_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=650%2C300&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":600} --><\/p>\n<p> For this portion of the tutorial we&#8217;ll be combing several things together in order to turn our LedBorg LED module into a rain indicator based on the weather forecast for our location. We&#8217;ll use a Python script to call a weather API which will in turn read the chance of rain for the day, and then toggle the LED from off to bright blue to indicate the forecasted rain. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":970} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> First, we need to get an API access key for Weather Underground. For personal use and small development projects the API is free. <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.wunderground.com\/weather\/api\/d\/pricing.html\">Visit the Weather API sign up page here<\/a> and sign up for an API key. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":199} --><\/p>\n<p> Once you have your API key, visit the Weather Underground and search for the city you want to monitor. In our case we&#8217;re going to monitor San Fransisco, CA. The URL for San Fransisco&#8217;s forecast page is: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":403} --><\/p>\n<blockquote>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":467} --><\/p>\n<p> The important part for our purposes is the last part of the URL: \/CA\/San_Francisco.html. We&#8217;re going to use that to edit the forecast URL for the API tool. The base URL is: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":641} --><\/p>\n<blockquote>\n<p>  API KEY\/forecast\/q\/STATE\/CITY.json <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":724} --><\/p>\n<p> You can generate the forecast for any US city by entering your API key, the two letter state code, and the city name from the URL you pulled from your Weather Underground search results. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":912} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Once you have the API URL with your API key and state\/city inserted, you can then edit the following Python script by creating a new text document on your Pi using Leafpad and pasting the following code into it: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":213} --><\/p>\n<blockquote>\n<pre>\n<code class=\"hljs javascript\">\n<span class=\"hljs-keyword\">from<\/span>\n urllib2 \n<span class=\"hljs-keyword\">import<\/span>\n urlopen\n<br \/><span class=\"hljs-keyword\">import<\/span>\n json<\/code>\n <\/pre>\n<pre>\n<code class=\"hljs xml\">req = urlopen(' API KEY\/forecast\/q\/STATE\/CITY.json\n<span class=\"hljs-tag\">&lt;\n<span class=\"hljs-name\">a<\/span>\n\u00a0\n<span class=\"hljs-attr\">href<\/span>\n=\n<span class=\"hljs-string\">\"<\/span>\n&gt;<\/span>\n')\n<span class=\"hljs-tag\">\n<span class=\"hljs-name\">a<\/span>\n&gt;<\/span>\n<br \/>parsed_json = json.load(req)\n<br \/>pop = \n<span class=\"hljs-keyword\">int<\/span>\n(parsed_json(\n<span class=\"hljs-string\">'forecast'<\/span>\n)(\n<span class=\"hljs-string\">'txt_forecast'<\/span>\n)(\n<span class=\"hljs-string\">'forecastday'<\/span>\n)(\n<span class=\"hljs-number\">0<\/span>\n)(\n<span class=\"hljs-string\">'pop'<\/span>\n))<\/code>\n <\/pre>\n<p> # The following is a debugging value. <\/p>\n<p> # Edit out the hash and change <\/p>\n<p> # the integer to a 0-100 to test <\/p>\n<p> # the LED response. <\/p>\n<p> # pop = 0 <\/p>\n<pre>\n<code class=\"hljs php\">\n<span class=\"hljs-keyword\">print<\/span>\n\u00a0\n<span class=\"hljs-string\">'Current chance of precipitation is {}.'<\/span>\n.format(pop)<\/code>\n <\/pre>\n<pre>\n<code class=\"hljs php\">\n\n<br \/><\/code>\n <\/pre>\n<pre>\n<code class=\"hljs python\">if pop &gt; 20:\n<br \/>LedBorg = open(\n<span class=\"hljs-string\">'\/dev\/ledborg'<\/span>\n, \n<span class=\"hljs-string\">'w'<\/span>\n)\n<br \/>LedBorg.write(\n<span class=\"hljs-string\">'002'<\/span>\n)\n<br \/><span class=\"hljs-keyword\">del<\/span>\n LedBorg\n<br \/><span class=\"hljs-keyword\">print<\/span>\n (\n<span class=\"hljs-string\">'Rain!'<\/span>\n)\n<br \/><span class=\"hljs-keyword\">else<\/span>\n:\n<br \/>LedBorg = open(\n<span class=\"hljs-string\">'\/dev\/ledborg'<\/span>\n, \n<span class=\"hljs-string\">'w'<\/span>\n)\n<br \/>LedBorg.write(\n<span class=\"hljs-string\">'000'<\/span>\n)\n<br \/><span class=\"hljs-keyword\">del<\/span>\n LedBorg\n<br \/><span class=\"hljs-keyword\">print<\/span>\n (\n<span class=\"hljs-string\">'No rain!'<\/span>\n)<\/code>\n <\/pre>\n<\/blockquote>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":2580} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Save the file as wunderground.py in the \/home\/pi\/ directory. Open up the terminal and type in the following command: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":118} --><\/p>\n<blockquote>\n<p> python wunderground.py <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":152} --><\/p>\n<p> If you have entered your API key and your state\/city codes properly, it should kick back a response that looks like: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":270} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"421\" height=\"97\" loading=\"lazy\" alt=\"2013-03-05_145110\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_81_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474231_81_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=421%2C97&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":510} --><\/p>\n<p> If precipitation is predicted for your area your LedBorg output should look like such: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":598} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"649\" height=\"247\" loading=\"lazy\" alt=\"2013-03-05_185624\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_323_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_323_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=649%2C247&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":838} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":838,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":62,\"nextBlockCount\":394,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1232} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Now waiting for a rainy day to properly test the script would be tedious. If there is no chance of rain in your area today and you want to see the LED light up, edit the wunderground.py script and replace the &#8220;pop = pop&#8221; passthrough value in line 13 with a value greater than 20 such as the 60 that our forecast returned. Just remember to change the line back to &#8220;pop = pop&#8221; when you&#8217;re done. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":332} --><\/p>\n<p> The final step is to set up a cron job to automatically run the script we just saved on a regular interval in order to keep the LED indicator current. Since this task is necessary for both this script and the email indicator that follows, we&#8217;re going to cover setting up a cron job after we&#8217;ve shown you how to set up the other script. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":669} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":669} --><\/p>\n<h2 id=\"configuring-your-ledborg-as-a-gmail-indicator\"><span class=\"ez-toc-section\" id=\"Configuring_Your_LedBorg_as_a_Gmail_Indicator\"><\/span> Configuring Your LedBorg as a Gmail Indicator <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"650\" height=\"300\" loading=\"lazy\" alt=\"2013-03-05_185314\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_331_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_331_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=650%2C300&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":909} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Who doesn&#8217;t like the dopamine fix that comes with seeing new email in their inbox? In this portion of the tutorial we are going to show you how to use the LedBorg as an new Gmail indicator. Just like last time, we are going to combine an external input (in this case an Atom feed instead of an API) and a simple script to drive our LED. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":338} --><\/p>\n<p> We need to expand the functionality of our Python installation a little bit by installing <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/pypi.python.org\/pypi\/feedparser\">FeedParser<\/a>, a Python RSS\/Atom feed reading tool. Open up the terminal and enter the following command: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":532} --><\/p>\n<blockquote>\n<p> sudo easy_install feedparser <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":572} --><\/p>\n<p> Once the installation is complete we can set to work creating our Gmail checking script. Again, using Leafpad, paste the following text into the editor. Change the username and password to match the username and password of the Gmail account you wish to check. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":834} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":834,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":66,\"nextBlockCount\":1880,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":2714} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<blockquote>\n<pre>\n<code class=\"hljs javascript\">\n<span class=\"hljs-keyword\">import<\/span>\n feedparser<\/code>\n <\/pre>\n<pre>\n<code class=\"hljs php\">\n<br \/><\/code>\n <\/pre>\n<pre>\n<code class=\"hljs javascript\">username = \n<span class=\"hljs-string\">\"username\"<\/span>\n<br \/>password = \n<span class=\"hljs-string\">\"password\"<\/span>\n<\/code>\n <\/pre>\n<pre>\n<code class=\"hljs java\">mail = \n<span class=\"hljs-keyword\">int<\/span>\n(feedparser.parse(\n<span class=\"hljs-string\">\"<\/span>\n + username + \n<span class=\"hljs-string\">\":\"<\/span>\n + password +\n<span class=\"hljs-string\">\"@mail.google.com\/gmail\/feed\/atom\"<\/span>\n)(\n<span class=\"hljs-string\">\"feed\"<\/span>\n)(\n<span class=\"hljs-string\">\"fullcount\"<\/span>\n))<\/code>\n <\/pre>\n<p> # The following is a debugging value. <\/p>\n<p> # Edit out the hash and change <\/p>\n<p> # the integer to a 0 or 1 to test <\/p>\n<p> # the LED response. <\/p>\n<p> # mail = 0 <\/p>\n<pre>\n<code class=\"hljs python\">if mail &gt; 0 :\n<br \/>LedBorg = open(\n<span class=\"hljs-string\">'\/dev\/ledborg'<\/span>\n, \n<span class=\"hljs-string\">'w'<\/span>\n)\n<br \/>LedBorg.write(\n<span class=\"hljs-string\">'020'<\/span>\n)\n<br \/><span class=\"hljs-keyword\">del<\/span>\n LedBorg\n<br \/><span class=\"hljs-keyword\">print<\/span>\n (\n<span class=\"hljs-string\">'Mail!'<\/span>\n)\n<br \/><span class=\"hljs-keyword\">else<\/span>\n:\n<br \/>LedBorg = open(\n<span class=\"hljs-string\">'\/dev\/ledborg'<\/span>\n, \n<span class=\"hljs-string\">'w'<\/span>\n)\n<br \/>LedBorg.write(\n<span class=\"hljs-string\">'000'<\/span>\n)\n<br \/><span class=\"hljs-keyword\">del<\/span>\n LedBorg\n<br \/><span class=\"hljs-keyword\">print<\/span>\n (\n<span class=\"hljs-string\">'No mail!'<\/span>\n)<\/code>\n <\/pre>\n<\/blockquote>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":1814} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> Save the script as gmailcheck.py. Open up the terminal and type the following command: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":88} --><\/p>\n<blockquote>\n<p> python gmailcheck.py <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":120} --><\/p>\n<p> If you have email sitting in your Gmail inbox the LED will turn green and you will get a response like such: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":230} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"421\" height=\"82\" loading=\"lazy\" alt=\"2013-03-05_152152\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_424_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_424_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=421%2C82&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":470} --><\/p>\n<p> If you have mail in your Gmail inbox your LedBorg will look like so: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":540} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"650\" height=\"248\" loading=\"lazy\" alt=\"2013-03-05_185935\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_787_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474232_787_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=650%2C248&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":780} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":780,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":120,\"nextBlockCount\":333,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1113} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Just like the rain checking script, we have included a debugging value. If you don&#8217;t have any new email you could either send yourself an email to raise your inbox count to 1 or you could edit out the comment hash and change the debugging line to &#8220;mail = 1&#8221; to test the script. Remember to revert the line when you&#8217;re done testing. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":213} --><\/p>\n<p> Hop into the next section of the tutorial to set your Gmail script to run on a schedule. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":303} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":303} --><\/p>\n<h2 id=\"setting-up-a-cron-job-to-run-your-script\"><span class=\"ez-toc-section\" id=\"Setting_Up_a_Cron_Job_to_Run_Your_Script\"><\/span> Setting Up a Cron Job to Run Your Script <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"593\" height=\"315\" loading=\"lazy\" alt=\"2013-03-05_170817\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474233_421_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474233_421_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?resize=593%2C315&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":543} --><\/p>\n<p> Now that we have two scripts to play with, we need to set up a cron job in order to run them throughout the day to keep the LED indicator current. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":691} --><\/p>\n<p> The first thing we want to do is to turn off the LED if it is currently on from our previous experiments. At the terminal type: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":820} --><\/p>\n<blockquote>\n<p> echo &#8220;000&#8221; &gt; \/dev\/ledborg <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":860} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":860,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":40,\"nextBlockCount\":259,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1119} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> While you&#8217;re still at the command line, you can open up the cron editor. If you have never set up a cron job before, we would strongly suggest checking out our guide to using it here. That said, we&#8217;ll walk you through setting up a basic schedule right here. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":219} --><\/p>\n<p> At the terminal type: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":242} --><\/p>\n<blockquote>\n<p> sudo crontab &#8211;e <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":270} --><\/p>\n<p> This will open up the Raspbian cron table in the Nano text editor. Use the arrow keys to scroll down to the very bottom. This is where we&#8217;re going to setup the recurring cron job for our Python scripts. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":474} --><\/p>\n<p> If you want to set up the rain script, enter the following line into the cron table: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":560} --><\/p>\n<blockquote>\n<p> *\/5 * * * * python \/home\/pi\/wunderground.py <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":615} --><\/p>\n<p> Press CTRL+X to exit; select yes to save and overwrite the existing cron table. The value we entered in the cron table &#8220;*\/5 * * * *&#8221; sets the script to run every 5 minutes, forever. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":798} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":798,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":102,\"nextBlockCount\":343,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1141} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Every 5 minutes is a fine span of time for a script that checks for forecasted rain&#8212;you could even argue it&#8217;s a bit too aggressive&#8212;but if you&#8217;re trying to keep on top of your email it&#8217;s a bit too long a span for notification. If you&#8217;re setting up the schedule for the Gmail notification script enter the following line in the cron table: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":241} --><\/p>\n<blockquote>\n<p> *\/1 * * * * python \/home\/pi\/wunderground.py <\/p>\n<\/blockquote>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":296} --><\/p>\n<p> This entry runs the gmailcheck.py script every minute for a much speedier update notification. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":392} --><\/p>\n<hr \/>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":392} --><\/p>\n<p> That&#8217;s all there is to it! You can experiment with your own Python scripts by lifting the if\/else statements out of ours and trying them out with brand new variables. If you can find an input source for the data you can turn it into a variable in your Python script&#8212;stock market averages, pollen counts, Twitter mentions, if there is an API for it you can turn it into an ambient LED indicator. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":790} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":790,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":110,\"nextBlockCount\":576,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1366} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Finally, I want to give thanks to all the great resources I used to work on this project. It has been a bit over a decade since I was actively writing programs and it took a few knocks to get the dust and rust out. The contributors at <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.reddit.com\/r\/learnpython\">\/r\/LearnPython<\/a> helped me muck about in the API output for Weather Underground, studying how Michael over at Mitch Tech <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/mitchtech.net\/raspberry-pi-physical-gmail-notifier\/\">dealt with the Gmail Atom feed<\/a> made parsing it for the LedBorg easy, and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.codecademy.com\/tracks\/python\">studying the Python learning modules at Code Academy<\/a> was a great way to pick up the basic syntax and structure of a language I&#8217;d never used before. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":466} -->\n <\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Raspberry Pi makes a nice compact platform to attach an indicator light to for all sorts of projects&#8212;weather notification, new emails, etc. Read on as we show you how to hook up an LED module to your Pi and set up some basic notifications. Why Do I Want to Do This? Because it&#8217;s fun. &#8230; <a title=\"Build an LED Indicator with a Raspberry Pi (for Email, Weather, or Anything)\" class=\"read-more\" href=\"https:\/\/goodwriterz.com\/site\/build-an-led-indicator-with-a-raspberry-pi-for-email-weather-or-anything\/\" aria-label=\"Read more about Build an LED Indicator with a Raspberry Pi (for Email, Weather, or Anything)\">\u0625\u0642\u0631\u0623 \u0627\u0644\u0645\u0632\u064a\u062f<\/a><\/p>\n","protected":false},"author":1,"featured_media":47898,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[93],"tags":[341,95,644],"class_list":["post-47897","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-diy","tag-computer-hardware","tag-hardware","tag-raspberry-pi"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725474233_Build-an-LED-Indicator-with-a-Raspberry-Pi-for-Email.jpg?fit=650%2C300&ssl=1","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/posts\/47897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/comments?post=47897"}],"version-history":[{"count":0,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/posts\/47897\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/media\/47898"}],"wp:attachment":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/media?parent=47897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/categories?post=47897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/tags?post=47897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}