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
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
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 CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by