why do i keep getting the arduino Uno detected message saying it is ready for support package i have the package installed but it keeps stopping my code
3 次查看(过去 30 天)
显示 更早的评论
Connect_Arduino('a') ;
%define servo placement and mins and maxes
servo1 = servo(a, 'D3', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
servo2 = servo(a, 'D5', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
servo3 = servo(a, 'D6', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
%home servos
writePosition(servo1, 0);
writePosition(servo2, 0);
writePosition(servo3, 0);
stay = true;
position = input ('where do you want me to go position 1, 2 ,or 3? ');
if position == 1
while( stay == true)
%move servos to position 1 settings
servo1.write(60);
servo2.write(20);
servo3.write(60)
%wait 5 seconds
wait(5);
%chance to move positions.
stay = input ('stay? true,false');
end
elseif position == 2
while( stay == true)
%move servos to position 2 settings
servo1.write(60);
servo2.write(20);
servo3.write(60);
% wait 5 seconds
wait(5);
%chance to move positions.
input ('stay? true,false');
end
end
this is my code, whenever i run it i get this messege
This device is ready for use with MATLAB Support Package for Arduino Hardware. Get started with examples and other documentation.
This device is ready for use with Simulink Support Package for Arduino Hardware. Get started with example
i already have the packeges downloaded and installed but it will not let me run my code
1 个评论
Walter Roberson
2018-12-1
Connect_Arduino appears to be from the third-party https://github.com/camden-penn/MATLAB-ArduinoIO-Connectors
回答(1 个)
Madhu Govindarajan
2018-12-5
I guess what Walter is saying is that you are not using the MATLAB Support package for Arduino when you use Connect_Arduino command. Instead use a = arduino to use the MATLAB Support package for Arduino to connect to Arduino.
The rest of the functions might also need to be modified to take advantage of MATLAB Support.
Madhu
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!