Bird
0
0
Raspberry Piprogramming~10 mins

i2cdetect for device scanning in Raspberry Pi - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to scan I2C devices on bus 1 using i2cdetect.

Raspberry Pi
sudo i2cdetect -y [1]
Drag options to blanks, or click blank then click option'
A1
B3
C2
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using bus number 0 instead of 1
Omitting the '-y' flag which disables interactive mode
2fill in blank
medium

Complete the command to scan I2C bus 1 and show addresses in hexadecimal.

Raspberry Pi
sudo i2cdetect -y [1]
Drag options to blanks, or click blank then click option'
A1
B0
C16
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect bus number
Trying to add extra options for hex display which is default
3fill in blank
hard

Fix the error in the command to scan I2C bus 1 without confirmation prompts.

Raspberry Pi
sudo i2cdetect [1] 1
Drag options to blanks, or click blank then click option'
A-h
B-r
C-y
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using -r which is for read mode
Using -h which shows help
Using -v which is verbose mode
4fill in blank
hard

Fill both blanks to scan I2C bus 1 and show addresses in decimal format.

Raspberry Pi
sudo i2cdetect [1] [2]
Drag options to blanks, or click blank then click option'
A-y
B-d
C1
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -d to try to get decimal output
Forgetting to specify the bus number
5fill in blank
hard

Fill all three blanks to scan I2C bus 1, disable confirmation, and perform a quick scan.

Raspberry Pi
sudo i2cdetect [1] [2] [3]
Drag options to blanks, or click blank then click option'
A-r
B1
C-y
D-q
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up -r and -q
Omitting the bus number