Arduino - Simulink Course - Software Installation
Arduino - Simulink Course - Software Installation
University of Jordan
:Course coordinator
Mohammad AlShawabkeh/ B.Sc student Mechatronics engineering 09 Eng91moh@hotmail.com 962797150681+
:Prerequisites
Electronics 1 Digital logic design
Createdby: MohammadAlShawabkeh MechatronicsEngineering/B.Sc.Student Facultyof Engineering& Technology The Universityof Jordan Madaba,Jordan www.eng91moh.blogspot.com Mobile/Cellphone: +962797150681
2. How to install?
1. Matlab R2011a 7.12: via an attached DVD, the crack is "stand alone". 2. Arduino IDE: Go to www.Arduino.cc; (Download >> Windows >> save file). 3. ArduinoIO: Go to www.Mathworks.com; (Academia >> Teach branch >> Hardware for Project-Based Learning >> Arduino >> Arduino Support from MATLAB >> MATLAB Support Package for Arduino at Support Package >> Finally, click:
And save this file into a folder named "Arduino IO" for example.
3. Arduino installation:
Connect Arduino with PC using USB cable, then follow this procedure:
4. UPLOAD SRV.PDE (OR ADIOSRV.PDE) TO THE ARDUINO BOARD (to be done only once):
The srv.pde (or adiosrv.pde) is the "server" program that will continuously run on the microcontroller. It listens for MATLAB commands arriving from the serial port, executes the commands, and, if needed, returns a result. The following instructions are needed to upload the srv.pde file into the
controller's flash memory. Note that if you don't have the motor shield and don't plan to use it, then you can UPLOAD THE ADIOSRV.PDE file instead (the instructions are the same, except for the folder location). As long as no other file is uploaded later, this step does not need to be repeated anymore, and the package can be used as soon as the board is connected to the computer. From the Arduino IDE, go to File > Open, locate the file srv.pde, (in the ArduinoIO/pde/srv folder) and open it. If a dialog appears asking for the permission to create a sketck folder and move the file, press OK (this will create a srv folder and move the srv.pde file inside it). Connect the Arduino, make sure that the right board and serial port are selected in the IDE, (Tools/Board and Tool/Serial Port) then select File -> Upload to I/O Board and wait for the "Done Uploading" message. At this point the srv.pde file is uploaded and you can close the IDE, which is not needed anymore for the purpose of this package. Actually closing the IDE is suggested, so you can be sure that the serial connection to the arduino board is not taken by the IDE when matlab needs to use it. Note that the older files adiosrv.pde (IO pins only) and motorsrv.pde (motor shield only) are also still available as simplified versions for you to play around and create your own sketch versions. For older boards, should you have any connection problems, it is suggested that you try to upload and use the adiosrv.pde file.
will allow the updated path to be saved. From MATLAB, launch the "install_arduino" command, this will simply add the relevant ArduinoIO folders to the matlab path and save the path.
Reference:
1. www.Mathworks.com 2. www.Arduino.cc