Bird
0
0
Arduinoprogramming~5 mins

I2C scanner sketch in Arduino - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of an I2C scanner sketch?
An I2C scanner sketch helps find the addresses of devices connected to the I2C bus by checking all possible addresses and reporting which ones respond.
Click to reveal answer
beginner
Which Arduino library is commonly used for I2C communication in an I2C scanner sketch?
The Wire library is used for I2C communication in Arduino sketches, including I2C scanners.
Click to reveal answer
intermediate
In an I2C scanner sketch, what does the function Wire.beginTransmission(address) do?
It starts communication with the device at the given I2C address to check if it responds.
Click to reveal answer
intermediate
Why do we use Wire.endTransmission() in the I2C scanner sketch?
Wire.endTransmission() ends the transmission and returns a status code indicating if a device acknowledged the address.
Click to reveal answer
beginner
What range of addresses does the I2C scanner usually check?
It checks addresses from 1 to 127 because 0 is reserved and 7-bit addressing uses 7 bits for addresses.
Click to reveal answer
What does an I2C scanner sketch do?
AFinds all devices connected on the I2C bus
BSends data to all I2C devices
CResets the I2C bus
DChanges I2C device addresses
Which Arduino library is essential for I2C communication?
ASPI
BWire
CServo
DEthernet
What does Wire.endTransmission() return if a device acknowledges the address?
A2
B1
C0
D3
What address range is scanned in a typical I2C scanner sketch?
A0 to 255
B0 to 127
C1 to 255
D1 to 127
Why is address 0 usually skipped in I2C scanning?
AIt is reserved for general call
BIt is invalid
CIt is used for SPI devices
DIt is the broadcast address
Explain how an I2C scanner sketch works to find connected devices.
Think about how the sketch tries each address and listens for a response.
You got /5 concepts.
    Describe why the Wire library is important in writing an I2C scanner sketch.
    Focus on the functions that help communicate with I2C devices.
    You got /4 concepts.