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!
답변 (1개)
Madhu Govindarajan
2015년 10월 8일
0 개 추천
Have you tried using enablei2c - http://www.mathworks.com/help/supportpkg/raspberrypiio/ref/enablei2c.html
카테고리
도움말 센터 및 File Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!