Raspberry Pi I2C setting

1 回表示 (過去 30 日間)
PROJECT SR
PROJECT SR 2017 年 11 月 4 日
回答済み: Atsushi Matsumoto 2017 年 11 月 6 日
I want to use raspberry pi's I2C, but there is something wrong.
I checked raspberrypi property and condition was shown as follows.
DeviceAddress: 192.168.3.27
Port: 18734
BoardName: Raspberry Pi 3 Model B
AvailableLEDs: {'led0'}
AvailableDigitalPins: [4,5,6,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
AvailableSPIChannels: {'CE0','CE1'}
AvailableI2CBuses: {'i2c-1'}
AvailableWebcams: {}
I2CBusSpeed: 0
i2c-1 is enabled, so I used scanI2CBus as folllows
scanI2CBus(mypi,'i2c-1')
The answer is as follows, adress was not shown.
ans =
uint8
0
If anyone know how to solve this problem, please tell me.

回答 (1 件)

Atsushi Matsumoto
Atsushi Matsumoto 2017 年 11 月 6 日
Are you connecting any I2C device to your Raspberry Pi? What device are you connecting?
scanI2CBus only detects the address of the I2C device when I2C device is connected.
&nbsp
If you have additional question, please let me know your MATLAB version.

カテゴリ

Help Center および File ExchangeTest and Measurement についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!