{"id":11400,"date":"2016-11-03T21:34:09","date_gmt":"2016-11-04T01:34:09","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=11400"},"modified":"2022-02-13T11:43:30","modified_gmt":"2022-02-13T16:43:30","slug":"rgb-matrix-clock-plus-environmental-data-meter","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/rgb-matrix-clock-plus-environmental-data-meter\/","title":{"rendered":"RGB matrix displays time and environmental data"},"content":{"rendered":"<p>Temperature, humidity, and ambient pressure are the key parameters for environmental monitoring. With the advent of MEMS and integrated multi-sensor technologies, it&#8217;s been feasible to miniaturize environmental sensors and embed\u00a0them into portable electronics. <a href=\"https:\/\/www.bosch-sensortec.com\/bst\/products\/all_products\/bme280\" target=\"_blank\" rel=\"noopener noreferrer\">BME280<\/a> is one such\u00a0fully integrated environmental unit from Bosch that combines sensors for pressure, humidity, and temperature in a tiny 8-pin metal-lid LGA package of size 2.5 x 2.5 x 0.93 mm\u00b3. This article describes how to read the environmental\u00a0data from BME280 using Arduino and display the data on a 16&#215;32 RGB matrix panel using the RGB driver shield.<\/p>\n<div id=\"attachment_12376\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Demo6.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12376\" class=\"wp-image-12376 size-full\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Demo6.jpg\" alt=\"demo6\" width=\"800\" height=\"549\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Demo6.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Demo6-580x398.jpg 580w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-12376\" class=\"wp-caption-text\">RGB matrix displaying time, date and environmental data<\/p><\/div>\n<h4>Things you will need<\/h4>\n<p>Following items are used in this project:<\/p>\n<ol>\n<li><strong><a href=\"https:\/\/www.tindie.com\/products\/rajbex\/arduino-development-board-with-on-board-sd-slot\/\" target=\"_blank\" rel=\"noopener noreferrer\">Arduino Uno or any compatible board<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/www.tindie.com\/products\/rajbex\/16x32-rgb-matrix-panel-with-an-arduino-uno-shield\/\" target=\"_blank\" rel=\"noopener noreferrer\">16&#215;32 RGB panel + driver shield<\/a><\/strong><\/li>\n<li><strong><a href=\"http:\/\/www.elecrow.com\/power-supply\/chargers-adapters\/5v2a-acdc-power-adapter-with-cable-p-684.html\" target=\"_blank\" rel=\"noopener noreferrer\">5V, 2.0A DC power supply<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/www.amazon.com\/gp\/product\/B0118XCKTG\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0118XCKTG&amp;linkCode={{linkCode}}&amp;tag=rajbex-20&amp;linkId={{link_id}}\" target=\"_blank\" rel=\"noopener noreferrer\">BME280 sensor breakout<\/a><\/strong><img loading=\"lazy\" decoding=\"async\" style=\"border: none !important; margin: 0px !important;\" src=\"\/\/ir-na.amazon-adsystem.com\/e\/ir?t=rajbex-20&amp;l=am2&amp;o=1&amp;a=B0118XCKTG\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" \/><\/li>\n<\/ol>\n<p>The <a href=\"http:\/\/embedded-lab.com\/blog\/rgb-matrix-driver-shield\/\" target=\"_blank\" rel=\"noopener noreferrer\">16&#215;32 RGB LED matrix panel<\/a> consists of 512 bright RGB LEDs arranged in 16 rows and 32 columns. The row and column driver circuits are built on the back side of the matrix panel. The data and control signal pins are accessible through a HUB75 (8\u00d72 IDC) connector. It requires 12 digital I\/O pins of Arduino Uno for full color control. The display panel\u00a0also comes with a RGB connector shield for Arduino Uno and necessary cables for easy wiring between the RGB panel and the Arduino board. The connector shield also\u00a0features the DS1307 RTC chip on board along with a CR1220 coin-cell battery holder. The I2C pins of the DS1307 chip are pre-wired to A4 and A5 pins of the shield.<\/p>\n<div id=\"attachment_11848\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/09\/RGBpackage.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11848\" class=\"size-full wp-image-11848\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/09\/RGBpackage.jpg\" alt=\"RGB matrix panel kit\" width=\"800\" height=\"629\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/09\/RGBpackage.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/09\/RGBpackage-580x456.jpg 580w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-11848\" class=\"wp-caption-text\">RGB matrix panel kit<\/p><\/div>\n<h6>Buying Links for 16&#215;32 RGB panel kit:<\/h6>\n<h6><a href=\"https:\/\/www.tindie.com\/products\/rajbex\/16x32-rgb-matrix-panel-with-an-arduino-uno-shield\/\" target=\"_blank\" rel=\"noopener noreferrer\">From our US Tindie Store<\/a><\/h6>\n<h6><a href=\"http:\/\/www.elecrow.com\/cooperated-designers\/embedded-lab\/16x32-rgb-led-matrix-panel-arduino-driver-shield.html\" target=\"_blank\" rel=\"noopener noreferrer\">Buy from our Elecrow Store<\/a>\u00a0in China<\/h6>\n<h4>Connection setup<\/h4>\n<p>The <strong><a href=\"http:\/\/www.elecrow.com\/cooperated-designers\/embedded-lab\/16x32-rgb-led-matrix-panel-arduino-driver-shield.html\" target=\"_blank\" rel=\"noopener noreferrer\">RGB LED panel kit<\/a><\/strong> includes all the necessary cables and the Arduino Uno connector shield for an easy connection between the RGB driver pins and the Arduino I\/O pins. The following picture shows the proper way of connecting the Arduino shield and the RGB panel.<\/p>\n<div id=\"attachment_12381\" style=\"width: 870px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12381\" class=\"size-large wp-image-12381\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup1-1024x640.jpg\" alt=\"Wiring the RGB panel to Arduino shield\" width=\"860\" height=\"538\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup1-1024x640.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup1-580x363.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup1.jpg 1200w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/a><p id=\"caption-attachment-12381\" class=\"wp-caption-text\">Wiring the RGB panel to Arduino shield<\/p><\/div>\n<p>A complete hook up guide is provided <strong><a href=\"http:\/\/embedded-lab.com\/blog\/hookup-guide-for-16x32-rgb-led-panel\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/strong>. Basically, a 8&#215;2 IDC cable connects the input\u00a0HUB75 connector on the RGB panel&#8217;s back to the 12 pins of Arduino via the connector shield. The power supply pins of the RGB panel\u00a0are connected to + and &#8211; pins of the 2-pin terminal block on the Arduino shield. The 5V DC power supply required for the RGB panel is supplied via the 2.1mm barrel jack connector on the shield.<\/p>\n<p>The BME280 sensor support I2C communication. The sensor module&#8217;s data and clock pin are therefore connected to A4 and A5 pins of Arduino, respectively. I simply plugged in the the data and clock pins of the sensor breakout module into the shield headers as shown below and connected the power supply pins through jumper wires.<\/p>\n<div id=\"attachment_12384\" style=\"width: 870px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup4.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12384\" class=\"size-large wp-image-12384\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup4-1024x735.jpg\" alt=\"Sensor hook up\" width=\"860\" height=\"617\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup4-1024x735.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup4-580x416.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup4.jpg 1200w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/a><p id=\"caption-attachment-12384\" class=\"wp-caption-text\">Sensor hook up<\/p><\/div>\n<p>Next, you need to plug in the shield into Arduino Uno board.<\/p>\n<div id=\"attachment_12385\" style=\"width: 870px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup5.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12385\" class=\"size-large wp-image-12385\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup5-1024x787.jpg\" alt=\"RGB connector shield plugged into Arduino Uno\" width=\"860\" height=\"661\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup5-1024x787.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup5-580x446.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/Setup5.jpg 1200w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/a><p id=\"caption-attachment-12385\" class=\"wp-caption-text\">RGB connector shield plugged into Arduino Uno<\/p><\/div>\n<h4>Software<\/h4>\n<p>The Arduino is programmed to read the sensor data from BME280 and displays them on the RGB panel with different colors. The time and date are also displayed. If the DS1307 is not running at the time of programming, the date and time are set to the values corresponding to the clock settings on the computer at the time of uploading the sketch.<\/p>\n<p>Arduino libraries required for this project are:<\/p>\n<p><strong><a href=\"https:\/\/github.com\/adafruit\/RTClib\" target=\"_blank\" rel=\"noopener noreferrer\">RTClib for DS1307<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/github.com\/adafruit\/Adafruit-GFX-Library\">Adafruit GFX Library<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/github.com\/adafruit\/RGB-matrix-Panel\">Adafruit RGB Matrix Panel library<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\" rel=\"noopener noreferrer\">Adafruit unified sensor library<\/a><\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/adafruit\/Adafruit_BME280_Library\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Adafruit BME280 library<\/strong><\/a><\/p>\n<p>You can download the complete Arduino code from the link below.<\/p>\n<p><strong><a href=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/11\/RGB_16x32_BME280_DS1307rtc_Test.zip\">Download RGB16x32_BME80_DS1307RTC_TestCode<\/a><\/strong><\/p>\n<h4>Output<\/h4>\n<div id=\"attachment_12377\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12377\" class=\"wp-image-12377 size-full\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op1.jpg\" alt=\"op1\" width=\"800\" height=\"523\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op1.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op1-580x379.jpg 580w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-12377\" class=\"wp-caption-text\">Time and Day of Week display<\/p><\/div>\n<div id=\"attachment_12378\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op2.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12378\" class=\"wp-image-12378 size-full\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op2.jpg\" alt=\"op2\" width=\"800\" height=\"500\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op2.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op2-580x363.jpg 580w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-12378\" class=\"wp-caption-text\">Temperature in both C and F scales<\/p><\/div>\n<div id=\"attachment_12379\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op3.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12379\" class=\"wp-image-12379 size-full\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op3.jpg\" alt=\"op3\" width=\"800\" height=\"529\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op3.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op3-580x384.jpg 580w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-12379\" class=\"wp-caption-text\">Relative humidity data<\/p><\/div>\n<div id=\"attachment_12380\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op4.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12380\" class=\"wp-image-12380 size-full\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op4.jpg\" alt=\"op4\" width=\"800\" height=\"504\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op4.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2016\/10\/op4-580x365.jpg 580w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-12380\" class=\"wp-caption-text\">Displaying current date<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Temperature, humidity, and ambient pressure are the key parameters for environmental monitoring. With the advent of MEMS and integrated multi-sensor technologies, it&#8217;s been feasible to miniaturize environmental sensors and embed\u00a0them into portable electronics. BME280 is one such\u00a0fully integrated environmental unit from Bosch that combines sensors for pressure, humidity, and temperature in a tiny 8-pin metal-lid LGA package of size 2.5 x 2.5 x 0.93 mm\u00b3. This article describes how to read the environmental\u00a0data from BME280 using Arduino and display the data on a 16&#215;32 RGB matrix panel using the RGB driver shield. Things you will need Following items are used<\/p>\n","protected":false},"author":1,"featured_media":12376,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150,1464,592,1467],"tags":[],"class_list":["post-11400","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino-2","category-featured","category-led-display","category-projects"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/11400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=11400"}],"version-history":[{"count":16,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/11400\/revisions"}],"predecessor-version":[{"id":14985,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/11400\/revisions\/14985"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/12376"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=11400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=11400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=11400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}