Arduino Programming using MATLAB, 1st Edition (2015)
1. Preparing Development Environment
1.1 Arduino
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. This board uses Atmel microcontroller series. There are many Arduino hardware models that you can use. Further information about Arduino products, you can visit on websitehttp://arduino.cc/en/ .
You must one Arduino hardware to follow practices in this book. I recommend to obtain one of the following Arduino hardware:
· Arduino Uno
· Arduino Leonardo
· Arduino Mega 2560
· Arduino Due
You can buy this product on your local electronic store. You also can order it by online. Find it on http://arduino.cc/en/Main/Buy. The following is the list of Arduino store you can buy
· Arduino store, http://store.arduino.cc/
· Amazon, http://www.amazon.com
· Cooking-hacks, http://www.cooking-hacks.com/index.php/shop/arduino.html
· RS Components, http://www.rs-components.com
· Element 14, http://www.element14.com
· EXP-Tech, http://www.exp-tech.de
Because Arduino is an open-source hardware, people can build it. It's called Arduino compatible. Generally it's sold in low prices.
1.1.1 Arduino Uno
The Arduino Uno is a microcontroller board based on the ATmega328. You can download the datasheet file, http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf .
Further information about Arduino Uno, you can read it on http://arduino.cc/en/Main/ArduinoBoardUno .
1.1.2 Arduino Leonardo
The Arduino Leonardo is a microcontroller board based on the ATmega32u4. Download datasheet for this product on http://www.atmel.com/dyn/resources/prod_documents/7766S.pdf .
Visit this product to get the further information on http://arduino.cc/en/Main/ArduinoBoardLeonardo .
1.1.3 Arduino Mega 2560
The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. You can download the datasheet file on http://www.atmel.com/dyn/resources/prod_documents/doc2549.PDF.
Further information about Arduino Mega 2560, you can visit on http://arduino.cc/en/Main/ArduinoBoardMega2560 .
1.1.4 Arduino Due
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU. You can download the datasheet, http://www.atmel.com/Images/doc11057.pdf.
If you want to know about Arduino Due, I recommend to visit this website, http://arduino.cc/en/Main/ArduinoBoardDue.
1.2 Electronic Components
We need electronic components to build our testing, for instance, Resistor, LED, sensor devices and etc. I recommend you can buy electronic component kit.
1.2.1 Arduino Starter Kit
Store website: http://arduino.cc/en/Main/ArduinoStarterKit
1.2.2 Fritzing
Store website: http://shop.fritzing.org/ .
You can buy Fritzing Starter Kit with Arduino UNO or Fritzing Starter Kit with Arduino Mega.
1.2.3 Cooking-Hacks: Arduino Starter Kit
Store website: http://www.cooking-hacks.com/index.php/shop/arduino/starter-kits/arduino-starter-kit.html
1.2.4 Arduino Sidekick Basic kit
Store website: http://www.seeedstudio.com/depot/arduino-sidekick-basic-kit-p-775.html
Alternative online store
http://www.amazon.com/Arduino-Sidekick-Basic-Kit-Version/dp/B007B14HM8/
http://www.exp-tech.de/Zubehoer/Arduino-Sidekick-Basic-Kit.html
1.3 Matlab
MATLAB Support Package for Arduino hardware enables you to use MATLAB® to communicate with the Arduino® board over a USB cable. This package is based on a server program running on the board, which listens to commands arriving via serial port, executes the commands, and, if needed, returns a result.
This support package is available for R2014a and later releases. It’s available on 32-bit and 64-bit Microsoft® Windows®, 64-bit Mac OS, and 64-bit Linux®.
I will explain how to set up Matlab for Arduino development on chapter 2.
1.4 Testing
For testing, I used Arduino Uno R3 and Arduino Mega 2560 on OSX and Windows 10 platforms with Matlab 2015b.
I also used Arduino Sidekick Basic kit for electronic components.