- Getting started - https://www.mathworks.com/help/simulink/supportpkg/arduino_ug/io-device-builder.html
- Interfacing DHT11 sensor with Arduino using IO Device Builder - https://www.mathworks.com/help/simulink/supportpkg/arduino_ref/dht11-relative-humidity-temperature-io-device-builder.html
- Interfacing ADXL343 sensor with Arduino - https://www.mathworks.com/help/simulink/supportpkg/arduino_ref/adxl343-read-acceleration-io-device-builder.html
How to define slave address of a component of an I2C device
3 views (last 30 days)
Show older comments
Hi!!! I'm a PhD student in a PhD programme of Electronics and computer Science with a degree in Chemistry with almost no experience in controlling my Arduino Uno with Matlab, so my question could be quite simple and also I need a very simple and basic explanation. The point is the following: as part of my project I need to control a RGB1602 DFRobot display entirely with Matlab, so I'm replacing the Arduino library of the display with a Matlab code. In order to replace the library I need to define the slave address of the LCD controller and RGB controller inside the display, but I can't do that with the define(arduinoobject, 'I2CAddress', slave address) command, because they are not on the I2C bus. How can I define that addresses? The slave address of the LCD controller is 0x7C, whereas the slave address for the RGB controller is 0xC0. If someone could help me I would be really grateful!!
0 Comments
Answers (1)
Aravind
on 24 Jun 2025
From your question, it seems you are trying to control the RGB1602 DFRobot display from MATLAB via Arduino and are having trouble interfacing the two. Since the display has available Arduino libraries, the most efficient way to interface it with MATLAB is by using the "IO Device Builder" app, which is part of the "Simulink Support Package for Arduino Hardware". With this app, you can include third-party or custom C/C++ libraries to create a System object that interacts with the hardware you're using.
By utilizing the "IO Device Builder" app, you can build a System object that communicates with your LCD display, without needing to convert the entire Arduino library into MATLAB code.
For more details on the "IO Device Builder" app, you can refer to the following documentation page: https://www.mathworks.com/help/simulink/arduino-io-device-builder.html.
Additionally, here are a few tutorials to help you get started with the "IO Device Builder" app:
Hope this helps!
0 Comments
See Also
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!