<h1>BEE Board and Matlab Technical Computing</h1>

<p class="abstract">
How to manage BeeBoard from Matlab the Language of Technical Computing
</p>

If you need to use an environment for numerical and statistical analysis, you can put the bee in communication with Matlab software to drive the ADC, PWM and digital IO.

<img src="./bee_matlab.png" />

## Install Arduino Matalb Software

* Download [Arduino Matlab Support Package](http://www.mathworks.it/academia/arduino-software/arduino-matlab.html)
* Run Matlab and change the current directory with the directory of the Arduino support package
* run install_arduino.m to add Arduino folder to the matlab path

<img src="./matlab_install_arduinopath.png" />

* run Arduino Software and open the sketch adiosrv.pde located to "ArduinoIO/pde/"
* Compile and upload code to BeeBoard
Now your Matlab environment is ready to work to the Bee over USB.

## Control your BEE Board over USB from a MATLAB


<h3> Create Arduino Object by specifying the address of the usb port.</h3>

<img src="./matlab_arduino_object.png"/>

<h3> Read Digital Port Input value </h3>

<img src="./matlab_digitalread.png"/> 

<h3>Set Digital Port Output value</h3>

<img src="./matlab_digitalwrite.png"/>

<h3>Set PWM value</h3>

<img src="./matlab_analogwrite.png"/>

<h3>Read ADC value</h3>

<img src="./matlab_analogread.png"/>

## Example: ADC Datalogger

<iframe width="320" height="240" src="http://www.youtube.com/embed/hNZb6Bwmhzo" frameborder="0" allowfullscreen></iframe>

Matlab function 
<span class="github" user="Madefree" project="playground" file="Matlab/datalogger.m">datalogger.m
</span>

## Related links

* [Wikipedia Matlab definition](http://en.wikipedia.org/wiki/MATLAB)
* [Arduino Matlab Support Package](http://www.mathworks.it/academia/arduino-software/arduino-matlab.html)
* [BEE Board PINOUT](http://www.acmesystems.it/beeboard_pinout)

@shop='BEEBOARD'
@shop='BEEKIT-1'
@shop='BEEKIT-2'

