How to communicate with the Arduino-I2C in Simulink
38 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I can't communicate between two Arduino UNO with the I2C-Bus using Simulink. Can someone help me. I don't know how to choose the block settings.
In addition ,I want to control an I2C-LCD Display. Is it possible?
Thanks for any help! Stefan
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159269/image.jpeg)
>>
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159271/image.jpeg)
0 件のコメント
回答 (2 件)
Sam McDonald
2016 年 12 月 29 日
If you are just getting started with Arduino and I2C, I would suggest reading the documentation. You can get to it by clicking the 'Help' button on each of those blocks. That will lead you to the documentation for that specific block.
There are also several examples available with step-by-step instructions at:
The documentation will help you know the meaning of the block settings and give you the tools to know how to interface with the LCD.
0 件のコメント
Denny Rohland
2023 年 1 月 22 日
Hello Experts
I'm just trying to read into the topic I2C bus.
My goal is to read 4x I2C devices with 4x analog channels each on the Arduino Mega.
For this I would like to use the Simulink block.
Unfortunately, I do not receive any data in the display which I can use in any way.
Now the following questions arise:
Do I first have to send a request to the respective device, which specifically contains the register address I want to query?
Do I then have to actively query this register address in order to obtain the data from this register address?
The Simulink block for I2C has several options that can be set.
Including the option of [Enable Register access]. What do I have to enter here? The Address tab I want to query?
Then there is the [Output Error Status]. This outputs values in the range 0-4. What do they mean?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!