{"id":2352,"date":"2018-03-30T11:53:13","date_gmt":"2018-03-30T15:53:13","guid":{"rendered":"https:\/\/blogs.mathworks.com\/iot\/?p=2352"},"modified":"2018-03-30T11:54:40","modified_gmt":"2018-03-30T15:54:40","slug":"discussions-about-how-to-use-matlab-and-arduino-on-the-matlab-maker-community","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/iot\/2018\/03\/30\/discussions-about-how-to-use-matlab-and-arduino-on-the-matlab-maker-community\/","title":{"rendered":"Discussions About How to Use MATLAB and Arduino on the MATLAB Maker Community"},"content":{"rendered":"<p>As most of you know I love building IoT projects. Most of these maker projects use an Arduino, Particle, or Raspberry Pi, like my <a href=\"http:\/\/nothans.com\/cheerlights-robot-for-your-nursery\">IR color-changing\u00a0robot<\/a>\u00a0that connects to <a href=\"https:\/\/thingspeak.com\/channels\/1417\">ThingSpeak<\/a> and the <a href=\"https:\/\/cheerlights.com\/\">CheerLights<\/a> project.<\/p>\n<p><a href=\"http:\/\/nothans.com\/cheerlights-robot-for-your-nursery\"><img decoding=\"async\" loading=\"lazy\" width=\"768\" height=\"887\" class=\"aligncenter size-full wp-image-2354\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2018\/03\/Nursery_Robot_IoT.jpg\" alt=\"\" \/><\/a><\/p>\n<p>I recently became the moderator of the <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/maker.html (link no longer works)\">MATLAB Maker Community<\/a> that is hosted on MATLAB Central. There are many times where MATLAB and Simulink\u00a0can 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\u00a0<a href=\"https:\/\/thingspeak.com\/apps\/matlab_visualizations\/19889?width=auto\">most popular<\/a>\u00a0colors on CheerLights in the last 30 days.<a href=\"https:\/\/thingspeak.com\/apps\/matlab_visualizations\/19889?width=auto\"><img decoding=\"async\" loading=\"lazy\" width=\"1841\" height=\"1043\" class=\"aligncenter size-full wp-image-2356\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2018\/03\/Popular_CheerLights_Colors.png\" alt=\"\" \/><\/a><\/p>\n<p>The goal of the <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/maker.html (link no longer works)\">MATLAB Maker Community<\/a>\u00a0is 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.<\/p>\n<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/discussions\/maker\/27-how-to-control-an-arduino-from-matlab\"><img decoding=\"async\" loading=\"lazy\" width=\"518\" height=\"390\" class=\"aligncenter size-full wp-image-2358\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2018\/03\/MATLAB_Arduino.png\" alt=\"\" \/><\/a><\/p>\n<p>Right now, there is a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/discussions\/maker\/27-how-to-control-an-arduino-from-matlab\">discussion thread<\/a> about how to use MATLAB to interface and interact with an Arduino. Makers can use MATLAB to control an Arduino by first installing the\u00a0<a href=\"https:\/\/www.mathworks.com\/hardware-support\/arduino-matlab.html\">MATLAB<sup>\u00ae<\/sup>\u00a0Support Package for Arduino<\/a><sup>\u00ae<\/sup>. Once you have the support package, you can use MATLAB to control the Arduino with familiar MATLAB commands.<\/p>\n<pre class=\"language-matlab\">% create an Arduino object\r\na = arduino('com3', 'uno');<\/pre>\n<pre class=\"language-matlab\">% turn on an LED connected to Pin D11\r\nwriteDigitalPin(a, 'D11', 1);<\/pre>\n<pre class=\"language-matlab\">% turn off an LED connected to Pin D11\r\nwriteDigitalPin(a, 'D11', 0);<\/pre>\n<h2>Share your ideas on how to use the MATLAB connection to Arduino on the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/discussions\/maker\/27-how-to-control-an-arduino-from-matlab\">MATLAB Maker Community<\/a>.<\/h2>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2018\/03\/Nursery_Robot_IoT.jpg\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>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\u00a0robot\u00a0that connects to ThingSpeak and the&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/iot\/2018\/03\/30\/discussions-about-how-to-use-matlab-and-arduino-on-the-matlab-maker-community\/\">read more >><\/a><\/p>\n","protected":false},"author":148,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[258,256],"tags":[14,141,210,60,209],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/2352"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/users\/148"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/comments?post=2352"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/2352\/revisions"}],"predecessor-version":[{"id":2368,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/2352\/revisions\/2368"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/media?parent=2352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/categories?post=2352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/tags?post=2352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}