How to control PWM servo driver for arduino from Simulink?
16 次查看(过去 30 天)
显示 更早的评论
I'm looking for libraries/support to control a PWM driver module (PCA9685) connected to arduino from Simulink. I'm not very skilled with the Arduino add on, so I don't really know how to send I2C commands to the module fromSimulink.
回答(1 个)
Shreshth
2024-8-20
Hello Yash,
I understand that you want to control the motor driver by sending the I2C commands to the module from MATLAB.
For this you can install the "Simulink support package for Arduino" where the availible (PCA9685) motor blocks will be able to send I2C commands to Simulink.
Here is the link for the Mathworks example and the simulink support package for Arduino:
Thanks.
1 个评论
Devni
2024-9-11
but it only allows to control 4 motor channels with the pca9685 dc motor block. Is there a way to control 16 motors with it? I have tried to run a custom matlab function to do the job, but seems like the communication with pca9685 via i2c write block is not effecient. As I understood there should be some initial configuration needs to be done with pca9685 before controling the servos. is there any other way to do this?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!