What Is Arduino Programming?
Arduino® programming is supposed to be fun, but it can become frustrating and time consuming for tasks such as visualizing sensor data or incorporating signal processing, machine learning, controls, or advanced math into your projects.
Read, Write, and Analyze Data from Arduino Sensors
MATLAB support package for Arduino lets you write MATLAB programs that read and write data to your Arduino and access connected devices such as motors, LEDs, and I2C devices. Because MATLAB is a high-level interpreted language, prototyping and refining algorithms for your Arduino projects is easy, and you can see results from I/O instructions immediately, without recompiling. MATLAB includes thousands of built-in math, engineering, and plotting functions that you can use for your Arduino programming.
Benefits of using MATLAB for Arduino programming:
- Read and write sensor data interactively without waiting for your code to compile
- Develop algorithms and analyze sensor data using thousands of pre-built functions for signal processing, machine learning, mathematical modeling, and more
- Quickly visualize your data using the vast array of plot types in MATLAB
Develop Algorithms that Run Standalone on the Arduino
Simulink support package for Arduino lets you develop algorithms in Simulink, a block diagram environment for modeling dynamic systems and developing algorithms, and run them standalone on your Arduino. The support package extends Simulink with blocks for configuring and accessing Arduino sensors, actuators, and communication interfaces. After creating your Simulink model, you can simulate it, tune algorithm parameters until you get it just right, and download the completed algorithm for standalone execution on the device. With the MATLAB Function block, you can incorporate MATLAB code into your Simulink model.
Benefits of using Simulink for Arduino programming:
- Develop and simulate your algorithms in Simulink and use automatic code generation to run them on the device
- Incorporate signal processing, control design, state logic, and other advanced math and engineering routines in your hardware projects
- Interactively tune and optimize parameters in Simulink as your algorithm runs on your Arduino
- Easily modify algorithms to run on other low-cost and commercial hardware platforms
Examples and How To
See also: hardware for project-based learning, Model-Based Design, control systems, Internet of Things, Raspberry Pi programming, LEGO Mindstorms programming, robotics, control logic videos, robot programming, inverse kinematics