Hans on IoT

ThingSpeak, MATLAB, and the Internet of Things

Discussions About How to Use MATLAB and Arduino on the MATLAB Maker Community

As most of you know I love building IoT projects. Most of these maker projects use an Arduino, Particle, or Raspberry Pi, like my IR color-changing robot that connects to ThingSpeak and the CheerLights project.

I recently became the moderator of the MATLAB Maker Community that is hosted on MATLAB Central. There are many times where MATLAB and Simulink can help build a hardware-based project or be used to create the code running on a device. I also use MATLAB for analytics. Here are the most popular colors on CheerLights in the last 30 days.

The goal of the MATLAB Maker Community is to connect makers and builders together. I learn by working with others and sharing my work. If you are interested in maker project, I suggest following the Maker Community and jumping in on conversations or starting new discussions. I find this helpful if I am exploring a new idea or looking for feedback.

Right now, there is a discussion thread about how to use MATLAB to interface and interact with an Arduino. Makers can use MATLAB to control an Arduino by first installing the MATLAB® Support Package for Arduino®. Once you have the support package, you can use MATLAB to control the Arduino with familiar MATLAB commands.

% create an Arduino object
a = arduino('com3', 'uno');
% turn on an LED connected to Pin D11
writeDigitalPin(a, 'D11', 1);
% turn off an LED connected to Pin D11
writeDigitalPin(a, 'D11', 0);

Share your ideas on how to use the MATLAB connection to Arduino on the MATLAB Maker Community.

  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.