Tuesday, April 16, 2013

Week 2 Progress: April 10, 2013 - April 16, 2013: Arduino Background/ Setting up Arduino.

The Arduino is an "open-source electronics prototyping platform." It is basically a simple microcontroller with digital and analog inputs and outputs. It can be powered and interfaced with via USB. It can also run on its own external AC power source. It is coded for using the Arduino IDE. For this project MATLAB was used to code. The accelerometer used for this project uses 3 of the analog input pins to relay x, y, and z values.

There were a few steps that the team had to go through in order to configure the Arduino to work with MATLAB.

1. Download Arduino IDE from http://arduino.cc/en/main/software and install.
- Mac installation was quite simple while PC installation on Windows 8 required some troubleshooting
2. Connect Arduino and test which COM port it is plugged into.
3. Run a quick test program to ensure Arduino is functioning correctly.
4. Go to http://www.mathworks.com/academia/arduino-software/arduino-matlab.html and download the MATLAB Arduino support package.
5. Follow the instructions in the readme file to install. They are summarized in the following steps.
6. Upload the adiosrv.pde file to the Arduino.
7. Open the Arduino.m file in MATLAB to install Arduino libraries in MATLAB
8. Connect to Arduino using
    a=arduino('COMPORT')
    where COMPORT is the comport that was determined in step 2.

No comments:

Post a Comment