You are going about it a nice way though explaining yourself. He was very short and like I said its my first post. I am new and learning to understand this sort of stuff. I am mechanical by trade and this electronic programming is proving difficult to understand.
I have downloaded the relevant adafruit stepper librarys that are recommended to operate within the Arduino environment.
To interlink the MATLAB and Arduino it is recommened to download the ArduinoIO software support package.
This package contains a .pde to upload to the arduino for the matlab to be able to cross function with the arduino and the motor shield I have installed. That is the adafruit motor shield v2. I have uploaded this to the arduino. It is working like I said, a connection is made and functioning. Its just not allowing myself to run the two motors simultaneously.
I have created a GUI that has several buttons completing a few image processing tasks but when it comes down to moving the motors it is dependent on the pressing of one button. The coding for this is that stated previously, but I have added in where the arduino is referenced first in the program.
% --- Executes just before KnismesisGUI is made visible.
function KnismesisGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to KnismesisGUI (see VARARGIN)
% Choose default command line output for KnismesisGUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
set(handles.SpeedControl,'SelectedObject',handles.SlowButton);
set(handles.TransOptions,'SelectedObject',handles.OriginalButton);
clear all;
global a;
a = arduino('COM15');
function BeginButton_Callback(hObject, eventdata, handles)
% hObject handle to BeginButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global a;
a.stepperSpeed(1, 1);
a.stepperSpeed(2, 1);
a.stepperStep(1, 'backward', 'double',255);
a.stepperStep(2, 'forward', 'double', 255);
I have 'a' set as a global coordinate as it is the name given to the arduino in the input stage and needs to be capable of being referenced elsewhere in the program.
Sorry about the previous lack of information. Thanks for a bit more of an explanation about what is needed unlike the other fella.