{"id":697,"date":"2020-09-12T17:11:16","date_gmt":"2020-09-12T10:11:16","guid":{"rendered":"https:\/\/www.makeriot2020.com\/?p=697"},"modified":"2020-09-14T17:45:23","modified_gmt":"2020-09-14T10:45:23","slug":"multiple-i2c-devices-on-the-same-bus-i2c-part-3","status":"publish","type":"post","link":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/","title":{"rendered":"Multiple I2C Devices on the same Bus, I2C Part 3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus.  This will be an extremely short post, as it builds on skills that we have already covered. <br><br>I will connect the following<br><br>1 x 16&#215;2 I2C LCD Screen                address 0x27<br>1x 128&#215;32 I2C OLED Display       address 0x3C<br>2x PCF8574 I2C Io Extenders   address 0x20 and 0x21<br><br>All of these devices will be controlled from Arduino Uno, using the following libraries<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>LiquidCrystal_I2C.h to control the LCD screen,<br>Wire.h and PCF8574.h to control the I2C IO extenders and<br>Adafruit_GFX, Adafruit_SSD1306.h and SPI.h to control the SSD1306 128&#215;32 OLED display.<br><br>With DuPont wires and breadboards being the reliable things they are, I decided that, after initial testing, I will not show you how to do button inputs on the PCF8574 at this stage. The amount of stray capacitance floating around on the breadboards, and small momentary push-button switches, made for a very impressive but unreliable mess of wires, with no real learning value to it \ud83d\ude09 Maybe some more on that later when I do a decent real-world example using these technologies \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As the total distance between the devices is relatively short, it was not necessary to use pull-up resistors on the I2C bus in my setup. I suspect that that is due to the fact that they may already be included on some of my devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The circuit is quite straight forward.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"768\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/09\/20200912_165930-1024x768.jpg\" alt=\"\" class=\"wp-image-699 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165930-1024x768.jpg 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165930-scaled-600x450.jpg 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165930-300x225.jpg 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165930-768x576.jpg 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165930-1536x1152.jpg 1536w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165930-2048x1536.jpg 2048w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/768;\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>Connect all SDA pins on the I2C devices together serially, and connect that to the Arduino SDA pin ( That is usually A4)<\/li><li>Connect all SCL pins on the I2C devices together serially, and connect that to the Arduino SCL pin ( That is usually A5)<br><br>A note: On my Uno clone, there is an additional I2C breakout at the top of the device, near the USB adapter. I chose to use that as well as A4 and A5, as the bus hung itself up when connected to the breadboard. Your mileage may vary on this one \ud83d\ude42<br><\/li><li>Connect all 5v (Vcc) lines to 5v on the Arduino, and all Ground (GND) lines to GND on the Arduino.<\/li><li>Now connect 4 LEDs, through a suitable resistor ( 640 ohms up to 1k ohm ) to pin P0 and P1 on both of the PCF8574 IO extenders. Also, connect the other leg of the LED to ground.<\/li><li>I have powered my Uno from an external 5v power supply, as I did not want to pull too much current from the regulator on the actual Uno clone.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">That should complete your hardware setup. Double check all your connections, and then load the i2c scanner sketch in the Arduino IDE, you may find it under the examples for the Wire.h library. <br><br>Power up the circuit, and upload the sketch to the Uno. Open the Serial Monitor.<br><br>You should see 4 I2C devices being detected. Note their addresses. If you dont see 4 devices, check your wiring and addresses. You may have a device with a conflicting address or a bad connection. If you used the breadboard to connect the bus, chances are very good that you will not see all the devices.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"768\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/09\/20200912_165919-1024x768.jpg\" alt=\"\" class=\"wp-image-700 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165919-1024x768.jpg 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165919-scaled-600x450.jpg 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165919-300x225.jpg 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165919-768x576.jpg 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165919-1536x1152.jpg 1536w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165919-2048x1536.jpg 2048w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/768;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Good, if all of that is working, copy paste the following code into a new Arduino IDE window.<br>I will explain the code in the section below:<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>\/*\n  Multiple devices on the I2C bus\n  Maker and Iot Ideas, MakerIoT2020\n*\/\n\/\/ Include the libraries that we will need\n#include &lt;SPI.h> \/\/ needed for OLED display. \n#include &lt;PCF8574.h> \/\/ PCF8574\n#include &lt;Wire.h> \/\/ Generic I2C library\n#include &lt;Adafruit_GFX.h> \/\/ for OLED display\n#include &lt;Adafruit_SSD1306.h> \/\/ for OLED display\n#include &lt;LiquidCrystal_I2C.h> \/\/ For I2C LCD display\n\n\/\/ we need to define the size of the OLED screen\n\n#define OLED_WIDTH 128\n#define OLED_HEIGHT 32\n\n\/\/ mine does not have an onboard reset pin. If yours do, specify the \n\/\/ pin that it is connected to on the Arduino here. To use the \n\/\/ Arduino reset pin, specify -1 as below\n\n#define OLED_RESET -1\n\n\/\/ Define the OLED display, width,hight protocol and reset pin\nAdafruit_SSD1306 oled(OLED_WIDTH,OLED_HEIGHT, &amp;Wire, OLED_RESET);\n\n\/\/ Define the I2C LCD screen address and pin configuration\nLiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);\n\n\/\/ Define the PCF8574 devices ( you can have up to 8 on a bus )\n\/\/ but in this case, my LCD uses address 0x27, so I will have a \n\/\/ conflicting address if I were to use 8 of them together with the\n\/\/ LCD\n\nPCF8574 Remote_1(0x20); \nPCF8574 Remote_2(0x21);\n\n\/\/ Note the I2C addresses. You can obtain them from the i2c_scanner\n\nvoid setup() {\n  \/\/ serial debugging if needed\n  Serial.begin(115200);\n  \/\/ Start OLED Display Init\n\n  if (!oled.begin(SSD1306_SWITCHCAPVCC,0x3C)) { \/\/ Init the OLED \n    Serial.println(F(\"OLED INIT FAILED\"));\n    for(;;); \/\/ Dont proceed ... loop forever\n  }\n  oled.display();\n  delay(2000); \/\/ This delay is required to give display time to \n  \/\/ initialise properly\n  oled.clearDisplay();\n  oled.setTextSize(0);\n  oled.setTextColor(SSD1306_WHITE);\n  oled.setCursor(0,0);\n  oled.println(\"TEST SCREEN\");\n  oled.display();\n  delay(2000);\n  oled.clearDisplay();\n  oled.setCursor(1,0);\n  oled.println(\"OLED SCREEN ON\");\n  oled.display();\n\n  \/\/ Start the LCD\n\n  lcd.begin(16,2);\n  \n  \/\/ Set the initial state of the pins on the PCF8574 devices\n  \/\/ I found that the PCF8574 library sometimes does funny things\n  \/\/ This is also an example of how to use native i2c to set the \n  \/\/ status of the pins\n  \n  Wire.begin();\n  Wire.beginTransmission(0x20); \/\/ device 1\n  Wire.write(0x00); \/\/ all ports off\n  Wire.endTransmission();\n  Wire.begin();\n  Wire.beginTransmission(0x21); \/\/ device 2\n  Wire.write(0x00); \/\/ all ports off\n  Wire.endTransmission();\n  \/\/ Set pinModes for PCF8574 devices\n  \/\/ Note that there are two of them\n\n  Remote_1.pinMode(P0,OUTPUT);\n  Remote_1.pinMode(P1,OUTPUT);\n  Remote_2.pinMode(P0,OUTPUT);\n  Remote_2.pinMode(P1,OUTPUT);\n  \n  \/\/ Start both IO extenders\n\n  Remote_1.begin();\n  Remote_2.begin();\n\n  \/\/ and set ports to low on both\n  \/\/ you may find that if you ommit this step, they come up in an\n  \/\/ unstable state.\n\n  Remote_1.digitalWrite(P0,LOW);\n  Remote_1.digitalWrite(P1,LOW);\n  Remote_2.digitalWrite(P0,LOW);\n  Remote_2.digitalWrite(P1,LOW);\n  \n}\n\nvoid loop() {\n  \/\/ Draw a character map on the OLED display.\n  \/\/ This function is borrowed from the Adafruit library\n\n  testdrawchar();\n\n  \/\/ Write to the IO extenders\n\n  Remote_1.digitalWrite(P0,HIGH);\n  Remote_1.digitalWrite(P1,LOW);\n  Remote_2.digitalWrite(P0,HIGH);\n  Remote_2.digitalWrite(P1,LOW);\n  \n  \/\/ Display their status on the LCD\n  lcd.setCursor(0,0);\n  lcd.print(\" R1 P0=1 P1=0\");\n  lcd.setCursor(0,1);\n  lcd.print(\" R2 P0=1 P1=0\");\n  delay(500);\n\n  \/\/ Change status\n  Remote_1.digitalWrite(P1,HIGH);\n  Remote_1.digitalWrite(P0,LOW);\n  Remote_2.digitalWrite(P1,HIGH);\n  Remote_2.digitalWrite(P0,LOW);\n\n  \/\/ Update LCD\n  lcd.setCursor(0,0);\n  lcd.print(\" R1 P0=0 P1=1\");\n  lcd.setCursor(0,1);\n  lcd.print(\" R2 P0=0 P1=1\");\n  delay(500);\n  \/\/ Do some graphics on the OLED display\n  \/\/ Function borrowed from Adafruit\n  testdrawrect();\n  oled.clearDisplay();\n  delay(500);\n  \/\/ repeat indefinitely\n\n}\n\nvoid testdrawrect(void) {\n  oled.clearDisplay();\n\n  for(int16_t i=0; i&lt;oled.height()\/2; i+=2) {\n    oled.drawRect(i, i, oled.width()-2*i, oled.height()-2*i, SSD1306_WHITE);\n    oled.display(); \/\/ Update screen with each newly-drawn rectangle\n    delay(1);\n  }\n\n  delay(500);\n}\n\nvoid testdrawchar(void) {\n  oled.clearDisplay();\n\n  oled.setTextSize(1);      \/\/ Normal 1:1 pixel scale\n  oled.setTextColor(SSD1306_WHITE); \/\/ Draw white text\n  oled.setCursor(0, 0);     \/\/ Start at top-left corner\n  oled.cp437(true);         \/\/ Use full 256 char 'Code Page 437' font\n\n  \/\/ Not all the characters will fit on the display. This is normal.\n  \/\/ Library will draw what it can and the rest will be clipped.\n  for(int16_t i=0; i&lt;256; i++) {\n    if(i == '\\n') oled.write(' ');\n    else          oled.write(i);\n  }\n\n  oled.display();\n  delay(500);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This concludes a quick and dirty show and tell&#8230; I hope that it will stimulate questions and ideas for a lot of people.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you <\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following 1 x 16&#215;2 I2C LCD Screen address 0x271x 128&#215;32 I2C OLED Display address &hellip; <a href=\"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Multiple I2C Devices on the same Bus, I2C Part 3&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":698,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,44,51,5,50,52],"tags":[6,67,73,72,71],"class_list":["post-697","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-electronics","category-i2c-devices","category-i2c-lcd-and-arduino","category-io-extender-outputs","category-port-extender-inputs","tag-arduino","tag-i2c","tag-lcd-screen","tag-oled-display","tag-port-extender"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"makeriot2020\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Maker and IOT Ideas - Infinite possibilities, waiting to be explored\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas\" \/>\n\t\t<meta property=\"og:description\" content=\"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"165\" \/>\n\t\t<meta property=\"og:image:height\" content=\"93\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-09-12T10:11:16+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-09-14T10:45:23+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#blogposting\",\"name\":\"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas\",\"headline\":\"Multiple I2C Devices on the same Bus, I2C Part 3\",\"author\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/20200912_165911-scaled.jpg\",\"width\":2560,\"height\":1920},\"datePublished\":\"2020-09-12T17:11:16+07:00\",\"dateModified\":\"2020-09-14T17:45:23+07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#webpage\"},\"articleSection\":\"Arduino, Electronics, I2C Devices, I2C LCD and Arduino, IO-Extender-Outputs, Port Extender-Inputs, Arduino, I2C, LCD screen, OLED display, Port Extender\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.makeriot2020.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/#listItem\",\"name\":\"Arduino\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/#listItem\",\"position\":2,\"name\":\"Arduino\",\"item\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/i2c-lcd-and-arduino\\\/#listItem\",\"name\":\"I2C LCD and Arduino\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/i2c-lcd-and-arduino\\\/#listItem\",\"position\":3,\"name\":\"I2C LCD and Arduino\",\"item\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/i2c-lcd-and-arduino\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#listItem\",\"name\":\"Multiple I2C Devices on the same Bus, I2C Part 3\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/#listItem\",\"name\":\"Arduino\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#listItem\",\"position\":4,\"name\":\"Multiple I2C Devices on the same Bus, I2C Part 3\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/arduino\\\/i2c-lcd-and-arduino\\\/#listItem\",\"name\":\"I2C LCD and Arduino\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#organization\",\"name\":\"Maker and IOT Ideas\",\"description\":\"Infinite possibilities, waiting to be explored\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/LogoSmall.jpg\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#organizationLogo\",\"width\":165,\"height\":93},\"image\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/\",\"name\":\"makeriot2020\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#authorImage\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/5c0\\\/5c020e1b07a03d905edecd8711801fe8x96.jpg\",\"width\":96,\"height\":96,\"caption\":\"makeriot2020\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#webpage\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/\",\"name\":\"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas\",\"description\":\"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/20200912_165911-scaled.jpg\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#mainImage\",\"width\":2560,\"height\":1920},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2020\\\/09\\\/12\\\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\\\/#mainImage\"},\"datePublished\":\"2020-09-12T17:11:16+07:00\",\"dateModified\":\"2020-09-14T17:45:23+07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#website\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/\",\"name\":\"Maker and IOT Ideas\",\"description\":\"Infinite possibilities, waiting to be explored\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas","description":"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x","canonical_url":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#blogposting","name":"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas","headline":"Multiple I2C Devices on the same Bus, I2C Part 3","author":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.makeriot2020.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165911-scaled.jpg","width":2560,"height":1920},"datePublished":"2020-09-12T17:11:16+07:00","dateModified":"2020-09-14T17:45:23+07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#webpage"},"isPartOf":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#webpage"},"articleSection":"Arduino, Electronics, I2C Devices, I2C LCD and Arduino, IO-Extender-Outputs, Port Extender-Inputs, Arduino, I2C, LCD screen, OLED display, Port Extender"},{"@type":"BreadcrumbList","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com#listItem","position":1,"name":"Home","item":"https:\/\/www.makeriot2020.com","nextItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/#listItem","name":"Arduino"}},{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/#listItem","position":2,"name":"Arduino","item":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/i2c-lcd-and-arduino\/#listItem","name":"I2C LCD and Arduino"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/i2c-lcd-and-arduino\/#listItem","position":3,"name":"I2C LCD and Arduino","item":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/i2c-lcd-and-arduino\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#listItem","name":"Multiple I2C Devices on the same Bus, I2C Part 3"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/#listItem","name":"Arduino"}},{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#listItem","position":4,"name":"Multiple I2C Devices on the same Bus, I2C Part 3","previousItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/i2c-lcd-and-arduino\/#listItem","name":"I2C LCD and Arduino"}}]},{"@type":"Organization","@id":"https:\/\/www.makeriot2020.com\/#organization","name":"Maker and IOT Ideas","description":"Infinite possibilities, waiting to be explored","url":"https:\/\/www.makeriot2020.com\/","logo":{"@type":"ImageObject","url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#organizationLogo","width":165,"height":93},"image":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author","url":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/","name":"makeriot2020","image":{"@type":"ImageObject","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#authorImage","url":"https:\/\/www.makeriot2020.com\/wp-content\/wphb-cache\/gravatar\/5c0\/5c020e1b07a03d905edecd8711801fe8x96.jpg","width":96,"height":96,"caption":"makeriot2020"}},{"@type":"WebPage","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#webpage","url":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/","name":"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas","description":"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.makeriot2020.com\/#website"},"breadcrumb":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#breadcrumblist"},"author":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/09\/20200912_165911-scaled.jpg","@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#mainImage","width":2560,"height":1920},"primaryImageOfPage":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/#mainImage"},"datePublished":"2020-09-12T17:11:16+07:00","dateModified":"2020-09-14T17:45:23+07:00"},{"@type":"WebSite","@id":"https:\/\/www.makeriot2020.com\/#website","url":"https:\/\/www.makeriot2020.com\/","name":"Maker and IOT Ideas","description":"Infinite possibilities, waiting to be explored","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.makeriot2020.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"Maker and IOT Ideas - Infinite possibilities, waiting to be explored","og:type":"article","og:title":"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas","og:description":"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x","og:url":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/","og:image":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg","og:image:secure_url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg","og:image:width":165,"og:image:height":93,"article:published_time":"2020-09-12T10:11:16+00:00","article:modified_time":"2020-09-14T10:45:23+00:00","twitter:card":"summary_large_image","twitter:title":"Multiple I2C Devices on the same Bus, I2C Part 3 - Maker and IOT Ideas","twitter:description":"Today I will continue my series on I2C by showing you how to use multiple devices on the I2C bus. This will be an extremely short post, as it builds on skills that we have already covered. I will connect the following1 x 16x2 I2C LCD Screen address 0x271x 128x32 I2C OLED Display address 0x3C2x","twitter:image":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg"},"aioseo_meta_data":{"post_id":"697","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-03-31 05:04:08","updated":"2026-02-26 00:37:54","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.makeriot2020.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/\" title=\"Arduino\">Arduino<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/i2c-lcd-and-arduino\/\" title=\"I2C LCD and Arduino\">I2C LCD and Arduino<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMultiple I2C Devices on the same Bus, I2C Part 3\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.makeriot2020.com"},{"label":"Arduino","link":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/"},{"label":"I2C LCD and Arduino","link":"https:\/\/www.makeriot2020.com\/index.php\/category\/arduino\/i2c-lcd-and-arduino\/"},{"label":"Multiple I2C Devices on the same Bus, I2C Part 3","link":"https:\/\/www.makeriot2020.com\/index.php\/2020\/09\/12\/multiple-i2c-devices-on-the-same-bus-i2c-part-3\/"}],"_links":{"self":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/comments?post=697"}],"version-history":[{"count":0,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/697\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media\/698"}],"wp:attachment":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media?parent=697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/categories?post=697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/tags?post=697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}