arduino i2c communication
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 12 de Nov. de 2020
That code looks plausible. What error are you getting?
slamet khoeron
el 12 de Nov. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre MATLAB Support Package for Arduino Hardware en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!