How to communicate with the Arduino-I2C in Simulink
36 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
<<
>>
0 comentarios
Respuestas (2)
Sam McDonald
el 29 de Dic. de 2016
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 comentarios
Denny Rohland
el 22 de En. de 2023
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 comentarios
Ver también
Categorías
Más información sobre Modeling en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!