How can I access I2C on my Raspberry Pi A+?

Hi. I have succesfully established a wireless connection between Matlab R2014b and my Raspberry Pi A+ via wifi. I can build and run Simulink models on the Pi and read/write GPIOs.
However, when I establish a connection in Matlab using the following line, there are no available I2C busses. Also, it is recognized as a Model B Rev 1.
mypi = raspi('192.168.1.31')
mypi =
raspi with properties:
DeviceAddress: '192.168.1.31'
Port: 18725
BoardName: 'Raspberry Pi Model B Rev 1'
AvailableLEDs: {'led0'}
AvailableDigitalPins: [0 1 4 7 8 9 10 11 14 15 17 18 21 22 23 24 25]
AvailableSPIChannels: {}
AvailableI2CBuses: {}
I2CBusSpeed: []
Supported peripherals
When I manually check for I2C busses in the RPi's console, it finds 3 addresses (0x1e, 0x68 and 0x77).
pi@raspberrypi ~ $ sudo i2cdetect -y 1
I'm using Matlab R2014b with Raspberry Pi Support Package 14.2.0 (for both Matlab and Simulink).
Any clue how I can access the I2C bus in Matlab? Thanks!

Answers (1)

1 Comment

Hi Madhu, Thank you very much for your response. I'm abroad for a while, so I won't be able to see if it works just now. Will let you know when I can try it. Thanks!

Sign in to comment.

Categories

Find more on MATLAB Support Package for Raspberry Pi Hardware in Help Center and File Exchange

Asked:

on 21 Feb 2015

Commented:

on 8 Oct 2015

Community Treasure Hunt

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

Start Hunting!