I2C bus allows multiple devices to communicate using just two wires: SDA (data) and SCL (clock). It helps connect sensors, displays, and other modules easily.
Click to reveal answer
beginner
How do you connect multiple I2C devices to an Arduino?
You connect all devices' SDA pins together to Arduino SDA, and all SCL pins together to Arduino SCL. Each device must have a unique address to avoid conflicts.
Click to reveal answer
beginner
Why must each I2C device have a unique address?
Because the Arduino uses the address to talk to one device at a time. If two devices share the same address, the Arduino can't tell them apart and communication fails.
Click to reveal answer
intermediate
What can you do if two I2C devices have the same address?
You can change the address if the device supports it, use an I2C multiplexer, or use separate I2C buses if your board supports it.
Click to reveal answer
beginner
How do you scan for I2C devices connected to your Arduino?
You can run an I2C scanner sketch that tries all addresses and reports which devices respond. This helps find device addresses and check connections.
Click to reveal answer
How many wires are needed to connect multiple I2C devices to an Arduino?
AThree wires: SDA, SCL, and CS
BOne wire: SDA only
CTwo wires: SDA and SCL
DFour wires: SDA, SCL, VCC, and GND
✗ Incorrect
I2C uses two main wires for communication: SDA (data) and SCL (clock). Power and ground are separate but not part of the I2C bus.
What must be unique for each I2C device on the same bus?
AClock speed
BDevice address
CWire color
DPower voltage
✗ Incorrect
Each device must have a unique address so the Arduino can communicate with them individually.
If two devices share the same I2C address, what is a common solution?
AChange the Arduino board
BConnect devices to different pins
CUse different power supplies
DUse an I2C multiplexer
✗ Incorrect
An I2C multiplexer lets you switch between devices with the same address by selecting which device is active.
What Arduino function can help find connected I2C devices?
AI2C scanner sketch
BdigitalRead()
CanalogWrite()
DSerial.begin()
✗ Incorrect
An I2C scanner sketch tries all possible addresses and reports which devices respond.
Which pins on Arduino Uno are used for I2C communication?
AA4 (SDA) and A5 (SCL)
BD2 and D3
CD10 and D11
DA0 and A1
✗ Incorrect
On Arduino Uno, analog pin 4 is SDA and analog pin 5 is SCL for I2C.
Explain how to wire multiple I2C devices to an Arduino and why unique addresses are important.
Think about how devices talk on the same two wires.
You got /3 concepts.
Describe methods to handle address conflicts when connecting multiple I2C devices.
Consider hardware and software solutions.
You got /3 concepts.
Practice
(1/5)
1. What is the main reason multiple I2C devices can share the same two wires on an Arduino?
easy
A. They use different clock speeds to avoid conflicts
B. Each device uses a separate data wire
C. Each device has a unique address to identify it on the bus
D. They communicate one at a time using different power pins
Solution
Step 1: Understand I2C wiring basics
I2C devices share two wires: SDA (data) and SCL (clock).
Step 2: Identify how devices are distinguished
Devices use unique addresses so the master knows which device to talk to.
Final Answer:
Each device has a unique address to identify it on the bus -> Option C
Quick Check:
Unique addresses allow multiple devices on same wires [OK]
Hint: Remember: unique addresses let devices share wires [OK]
Common Mistakes:
Thinking devices use separate wires
Assuming different clock speeds separate devices
Believing devices use different power pins to communicate
2. Which Arduino code snippet correctly initializes the I2C bus for multiple devices?
easy
A. Wire.init();
B. Wire.begin();
C. Wire.begin(0x3C);
D. Wire.start();
Solution
Step 1: Recall the correct function to start I2C
The Arduino Wire library uses Wire.begin() to start the I2C bus as master.
Step 2: Check other options for correctness
Wire.begin(0x3C) sets device as slave with address 0x3C, not for master init. Wire.init() and Wire.start() do not exist in Wire library.
Final Answer:
Wire.begin(); -> Option B
Quick Check:
Wire.begin() starts I2C master bus [OK]
Hint: Use Wire.begin() once to start I2C bus [OK]
Common Mistakes:
Using Wire.begin(address) to start master
Calling non-existent Wire.init() or Wire.start()
Not calling Wire.begin() at all
3. Given this Arduino code snippet, what will be the output on the Serial Monitor if device at address 0x40 returns 25 and device at 0x41 returns 30?
A. Requesting from 0x51 instead of 0x50 causes no data
B. Missing Wire.begin() call
C. Using Wire.write() before Wire.requestFrom() is wrong
D. Serial.println() cannot print integers
Solution
Step 1: Analyze device addresses used
The code writes to 0x50 twice but requests data from 0x50 first, then 0x51 second. If 0x51 device is not connected, no data is returned.
Step 2: Understand impact on read values
Reading from 0x51 returns no data, so Wire.read() returns 0, causing sum to be zero or incorrect.
Final Answer:
Requesting from 0x51 instead of 0x50 causes no data -> Option A
Quick Check:
Address mismatch causes no data read [OK]
Hint: Check device addresses match in all calls [OK]
Common Mistakes:
Confusing write and requestFrom addresses
Forgetting to call Wire.begin() once
Thinking Wire.write() before requestFrom() is invalid
5. You want to connect three I2C temperature sensors with addresses 0x48, 0x49, and 0x4A to an Arduino. Which of the following is the best approach to read all sensors reliably?
hard
A. Call Wire.begin() once, then read each sensor by its unique address with Wire.requestFrom()
B. Call Wire.begin() before reading each sensor separately
C. Use separate SDA and SCL wires for each sensor to avoid conflicts
D. Assign the same address to all sensors and read them one by one
Solution
Step 1: Understand I2C bus initialization
Wire.begin() must be called once to initialize the bus as master before any communication.
Step 2: Read sensors by unique addresses on shared bus
Each sensor has a unique address; read each by calling Wire.requestFrom() with that address on the same SDA and SCL lines.
Step 3: Evaluate other options
Calling Wire.begin() multiple times is unnecessary. Using separate wires defeats I2C design. Assigning same address causes conflicts.
Final Answer:
Call Wire.begin() once, then read each sensor by its unique address with Wire.requestFrom() -> Option A
Quick Check:
One Wire.begin(), unique addresses, shared wires [OK]
Hint: Initialize once, read each device by unique address [OK]
Common Mistakes:
Calling Wire.begin() multiple times
Trying separate wires for each I2C device
Using same address for multiple devices
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.