![]() ![]() *Create an OLED object, the address is 0x3c*/ * Copyright GNU Lesser General Public License * The address of I2C and the name of SSD1306 display module can be seen * Connect the 2 SSD1306 devices to the port 0 and port 1 on the i2cmultiplexer respectively and then connect the I2cmultiplexer and Arduino, download this sample. How to install Libraries in Arduino IDE /*! Please down the DFRobot_I2C_Multiplexer Library, DFRobot_SSD1306 Library, DFRobot_Display Library and install it. Library: DFRobot_I2C_Multiplexer Library.Arduino IDE (Version requirements: V1.0.x or V1.8.x), Click to Download Arduino IDE from Arduino®.Gravity 4pin UART/I2c Cable (or several DuPont Cables) x3.Gravity I2C OLED-2864 Display (or similar) x2. ![]() However, through this I2C multiplexer's transfer, these two OLED displays can be normally used on the same I2C port at the same time. The OLED display used in this example has the fixed I2C address, so these two OLED displays cannot be directly hooked up to the same I2C port. This tutorial uses two OLED displays as an example to demonstrate how to use this I2C multiplexer. You can adjust the dial switchs as needed to set the address. If the dial switchs are all turned to the left(marked with ‘1’), then A2,A1,A0 are all high level, and the address is 0x77. Default I2C Address: 0x70 (dial switches all to 0)Īs shown in the picture above, the dial switchs are all turned to the right(marked with '0') by default, at this time, A2,A1,A0 are all low level, so the default address of the multiplexer is 0x70.In theory, you could hook up 8 multiplexers on address 0x70~0x77, to control 64 same-address devices. The default I2C address of the multiplexer is 0x70, and you can adjust from 0x70 to 0x77. 1 multiplexer has 8 I2C ports, this means you can hook up 8 same-address devices at the same I2C port by 1 multiplexer. This I2C multiplexer is easy to use, plug and plug and no need to weld. You just found the sensor you needed, and you want to wire up two or more to the I2C port of your mainboard, but later you realized that they have the fixed I2C address! That is, you can not use them on the same I2C port! Are you out of luck? Now don’t worry! DFRobot Gravity: I2C Multiplexer can easily solve the address conflict on the same I2C port. On the same I2C port, DFRobot Gravity: I2C Multiplexer solves the address conflict and enables the normal communication with multiple same-address I2C devices. Gravity_Digital_1-to-8_I2C_Multiplexer_SKU_DFR0576-DFRobot ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |