Problem loading Adafriut MotorShieldV2 library
4 次查看(过去 30 天)
显示 更早的评论
Hi, There seem to be a lot on unanswered questions similar to mine, but here goes: I have an Adafruit MotorShield V2.3 on an Arduino Uno and want to control a stepper motor with it, but can't get the MotorShieldV2 library to load, although I can load other libraries with no problem. I'm using MatLab 2016a and have tried it under 64-bit Windows 10 on a laptop and 64-bit Windows 7 on a desktop. Here's what I've tried:
a=arduino
a =
arduino with properties:
Port: 'COM3'
Board: 'Uno'
AvailablePins: {'D2-D13', 'A0-A5'}
Libraries: {'I2C'}
and all seems OK.
If I do this:
listArduinoLibraries()
I get:
ans =
'Adafruit/MotorShieldV2'
'I2C'
'SPI'
'Servo' "
I
clear a
and can then load any of three libraries successfully (with or without 'ForceBuild') :
a = arduino('COM3','Uno','Libraries',{'I2C' 'Servo' 'SPI'},'ForceBuild',true)
Updating server code on board Uno (COM3). Please wait.
a =
arduino with properties:
Port: 'COM3'
Board: 'Uno'
AvailablePins: {'D2-D13', 'A0-A5'}
Libraries: {'I2C', 'SPI', 'Servo'}
I
clear a
again but can't get the MotorShieldV2 library to load (with or without 'ForceBuild'):
a = arduino('COM3','Uno','Libraries','Adafruit/MotorShieldV2','ForceBuild',true)
Updating server code on board Uno (COM3). Please wait.
Cannot program board Uno (COM3). Please make sure the board is supported and the port and board type
are correct.
Any ideas on what I might be doing wrong, or not doing?
Thanks.
0 个评论
回答(2 个)
Venkata Siva Krishna Madala
2018-3-1
Hello Tony,
You are loading the Library incorrectly. It should be
a = arduino('COM3', 'Uno', 'Libraries', 'Adafruit\MotorShieldV2')
Regards,
Krishna Madala
Svenja Be
2019-12-5
Hey Tony!
I know this is an old question but maybe you'll still read this. I got the same problem with the Adafruit/NeoPixel library. Did you find a solution?
Thank you,
Svenja
0 个评论
另请参阅
类别
在 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!