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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Walter Roberson
el 1 de Dic. de 2018
Connect_Arduino appears to be from the third-party https://github.com/camden-penn/MATLAB-ArduinoIO-Connectors
Respuestas (1)
Madhu Govindarajan
el 5 de Dic. de 2018
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 comentarios
Ver también
Categorías
Más información sobre MATLAB Support Package for Arduino Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!