Hi, i wanted to know how could I control the Adafruit 16-Channel 12-bit PWM Drive using MATLAB and Arduino.
Can it be done using the arduinoi.o toolbox from MATLAB, or is there any way i can import the '.c' library to MATLAB ?
MATLAB Arduinoi.o and Adafruit 16-Chan. PWM Drive
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dav1309
- Posts: 5
- Joined: Tue Sep 01, 2015 11:21 pm
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: MATLAB Arduinoi.o and Adafruit 16-Chan. PWM Drive
We are not MATLAB users here. But it looks like Mathworks does have a support package for the V2 motor shield. This shield uses the same PCA9685 PWM chip as the PWM/Servo board, so it must be possible to talk to it from MATLAB.
http://www.mathworks.com/help/supportpk ... ld-v2.html
http://www.mathworks.com/help/supportpk ... ld-v2.html
- dav1309
- Posts: 5
- Joined: Tue Sep 01, 2015 11:21 pm
Re: MATLAB Arduinoi.o and Adafruit 16-Chan. PWM Drive
Thanks for your response.
So you think that by using the arduinoi.o. for the Servo Shield (i.e. a = arduino('com25', 'uno', 'Libraries', 'Adafruit\MotorShieldV2') ) i could communicate with the PWM Drive.
I read that the ServoShield only has Two servo pins (i.e. s = servo(shield, 1) and s = servo(shield, 2)), so how could i access the 16 pwm pins of the drive ?
So you think that by using the arduinoi.o. for the Servo Shield (i.e. a = arduino('com25', 'uno', 'Libraries', 'Adafruit\MotorShieldV2') ) i could communicate with the PWM Drive.
I read that the ServoShield only has Two servo pins (i.e. s = servo(shield, 1) and s = servo(shield, 2)), so how could i access the 16 pwm pins of the drive ?
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: MATLAB Arduinoi.o and Adafruit 16-Chan. PWM Drive
I don't know the internals of the MATLAB library. That is a question for The Mathworks. But in order to control the motor shield, they need to communicate with the PCS9685 chip on the shield.
The PWM/Servo shield use the same PCA9685 PWM chip. Communication with that chip is via the i2c bus which uses only 2 pins.
The PWM/Servo shield use the same PCA9685 PWM chip. Communication with that chip is via the i2c bus which uses only 2 pins.
Please be positive and constructive with your questions and comments.