arduino i2c communication
Show older comments
I am a beginner, and have difficulty understanding the programming language on Arduino i2c communication, and I have tried it but to no avail, I beg for your help, how to display the voltage data readings on each of the Arduino in matlab?
Thank you,

a = arduino("COM15","Uno","Libraries","I2C") %Create an arduino object with I2C library.
dev = i2cdev(arduinoObj,'0x02'); %Create a device object.
L00 = readVoltage(a,'A0'); % readvoltage at master
R00 = readVoltage(a,'A0'); % readvoltage at slave
2 Comments
Walter Roberson
on 12 Nov 2020
That code looks plausible. What error are you getting?
slamet khoeron
on 12 Nov 2020
Accepted Answer
More Answers (0)
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!