{"id":5920,"date":"2025-02-19T15:08:30","date_gmt":"2025-02-19T06:08:30","guid":{"rendered":"https:\/\/et.kyushu-u.ac.jp\/?page_id=5920"},"modified":"2025-02-19T15:08:30","modified_gmt":"2025-02-19T06:08:30","slug":"trymatlab04","status":"publish","type":"page","link":"https:\/\/et.kyushu-u.ac.jp\/index.php\/report\/trymatlab04\/","title":{"rendered":"MATLAB\u3092\u4f7f\u3063\u3066\u307f\u307e\u305b\u3093\u304b\uff1f"},"content":{"rendered":"<h1>\u7b2c\uff14\u56de\uff1aArduino\u3068\u901a\u4fe1\u3059\u308b<\/h1>\n<p style=\"text-align: right;\">\u8a2d\u5099\u30fb\u60c5\u5831\u6280\u8853\u5ba4\u3000AI\u30fb\u30e1\u30ab\u30c8\u30ed\u30cb\u30af\u30b9\u73ed<br \/>\n\u6728\u5ead\u3000\u6d0b\u4ecb<\/p>\n<p style=\"border: 1px solid; padding: 0.5em;\">\u7686\u69d8\u306fMATLAB\u3068\u3044\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\u3002MATLAB\u306f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u958b\u767a\u3001\u30c7\u30fc\u30bf\u89e3\u6790\u3001\u53ef\u8996\u5316\u3001\u6570\u5024\u8a08\u7b97\u306e\u305f\u3081\u306e\u7d71\u5408\u958b\u767a\u74b0\u5883\u3067\u3059\u3002\u69d8\u3005\u306a\u5206\u91ce\u306b\u5bfe\u5fdc\u3057\u305fToolbox\uff08\u30a2\u30c9\u30aa\u30f3\u88fd\u54c1\uff09\u304c\u3042\u308a\u3001\u3053\u308c\u3089\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u8907\u96d1\u306a\u51e6\u7406\u3092\u7c21\u6f54\u306a\u30b3\u30fc\u30c9\u3067\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4e5d\u5dde\u5927\u5b66\u60c5\u5831\u7d71\u62ec\u672c\u90e8\u306f\u3001\u300cMATLAB Campus-Wide License\uff08\u5305\u62ec\u30e9\u30a4\u30bb\u30f3\u30b9\u5951\u7d04\uff09\u300d\u306e\u904b\u7528\u30922023\u5e741\u67084\u65e5\u304b\u3089\u958b\u59cb\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001MATLAB\/Simulink\u304a\u3088\u3073100\u4ee5\u4e0a\u306eToolbox\uff08\u30a2\u30c9\u30aa\u30f3\u88fd\u54c1\uff09\u306e\u4ed6\u30aa\u30f3\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u3001\u6559\u8077\u54e1\u306f\u6709\u511f\u3067\u3059\u304c\u3001\u5b66\u751f\u306f\u7121\u511f\uff08!!\uff09\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u3053\u3067\u306f\u3001\u300cMATLAB\u3067\u3053\u3046\u3044\u3046\u4e8b\u304c\u3067\u304d\u307e\u3059\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u3054\u7d39\u4ecb\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<span style=\"color: red;\">\u203b \u6b8b\u5ff5\u306a\u304c\u3089\u300cMATLAB Campus-Wide License\uff08\u5305\u62ec\u30e9\u30a4\u30bb\u30f3\u30b9\u5951\u7d04\uff09\u300d\u306f\u30012025\u5e7412\u6708\u672b\u3092\u3082\u3063\u3066\u7d42\u4e86\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/span>\n<\/p>\n<p>\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u30a2\u30c9\u30aa\u30f3\u88fd\u54c1\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n<span style=\"font-weight: bold;\">MATLAB Support Package for Arduino Hardware<\/span><\/p>\n<h2 style=\"padding: 0.2em 0.5em; border-left: solid 7px;\"><b>\u306f\u3058\u3081\u306b<\/b><\/h2>\n<p>\u4eca\u56de\u306f\u3001MATLAB\u3092\u4ecb\u3057\u3066Arduino\u3068\u901a\u4fe1\u3057\u3001Arduino\u306b\u63a5\u7d9a\u3057\u305f\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u52d5\u304b\u3057\u307e\u3059\u3002<\/p>\n<p>Arduino\u306f\u30ef\u30f3\u30dc\u30fc\u30c9\u30de\u30a4\u30b3\u30f3\u306e\u4e00\u7a2e\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u30bb\u30f3\u30b5\u30fc\u3084\u30a2\u30af\u30c1\u30e5\u30a8\u30fc\u30bf\u3068\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u30ed\u30dc\u30c3\u30c8\u3084IoT\u306e\u5206\u91ce\u3067\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.arduino.cc\/\" target=\"_blank\" rel=\"noopener\">&gt; Arduino<\/a><\/p>\n<p>\u958b\u767a\u74b0\u5883\u3068\u3057\u3066Arduino IDE\u304c\u516c\u958b\u3055\u308c\u3066\u304a\u308a\u3001C\/C++\u3092\u30d9\u30fc\u30b9\u3068\u3057\u305fArduino\u8a00\u8a9e\u3067\u4f5c\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Arduino\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001MATLAB\u3092\u4f7f\u3063\u3066\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002MATLAB\u3092\u4f7f\u3046\u3053\u3068\u306e\u30e1\u30ea\u30c3\u30c8\u306f\u3001\u4f8b\u3048\u3070\u3001\u30db\u30b9\u30c8PC\u306b\u63a5\u7d9a\u3057\u305f\u30ab\u30e1\u30e9\u6620\u50cf\u3092MATLAB\u3067\u753b\u50cf\u89e3\u6790\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u3082\u3068\u306bArduino\u306b\u63a5\u7d9a\u3057\u305f\u30a2\u30af\u30c1\u30e5\u30a8\u30fc\u30bf\u3092\u52d5\u304b\u3057\u305f\u308a\u3001Arduino\u306b\u63a5\u7d9a\u3057\u305f\u30bb\u30f3\u30b5\u306e\u5024\u3092MATLAB\u306b\u53d6\u308a\u8fbc\u307f\u3001\u89e3\u6790\u3057\u305f\u7d50\u679c\u3092\u53ef\u8996\u5316\u3057\u305f\u308a\u306a\u3069\u3001\u69d8\u3005\u306a\u30b7\u30b9\u30c6\u30e0\u3092\u5bb9\u6613\u306b\u958b\u767a\u3067\u304d\u308b\u3053\u3068\u3060\u3068\u8a00\u3048\u307e\u3059\u3002<\/p>\n<p>Arduino\u3068\u306e\u901a\u4fe1\u306f\u3001MATLAB\u304a\u3088\u3073Simulink\u306e\u4e21\u65b9\u3067\u3067\u304d\u307e\u3059\u304c\u3001Arduino\u4e0a\u3067\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u52d5\u4f5c\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306fSimulink\u3067\u3057\u304b\u4f5c\u308c\u306a\u3044\u3068\u3044\u3063\u305f\u9055\u3044\u304c\u3042\u308a\u307e\u3059\u3002\u4e21\u8005\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/jp.mathworks.com\/hardware-support\/arduino.html\" target=\"_blank\" rel=\"noopener\">&gt; Arduino Support from MATLAB and Simulink<\/a><\/p>\n<p>\u672c\u8a18\u4e8b\u3067\u306fMATLAB\u3092\u4f7f\u3063\u3066Arduino\u3068\u901a\u4fe1\u3057\u307e\u3059\u3002\u30a2\u30c9\u30aa\u30f3\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u304b\u3089\u300cMATLAB Support Package for Arduino Hardware\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u9014\u4e2d\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u884c\u3046\u304b\u805e\u304b\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u3082\u3067\u304d\u307e\u3059\u306e\u3067\u300c\u5f8c\u3067\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u300d\u3092\u9078\u629e\u3057\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b8c\u4e86\u3057\u3066\u9802\u3044\u3066\u7d50\u69cb\u3067\u3059\u3002<\/p>\n<h2 style=\"padding: 0.2em 0.5em; border-left: solid 7px;\"><b>\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u69cb\u6210<\/b><\/h2>\n<p>\u4f7f\u7528\u3059\u308b\u30dc\u30fc\u30c9\u306f\u300cArduino UNO R3\u300d\u3067\u3059\u3002\u30db\u30b9\u30c8PC\u3068USB\u3067\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059\u3002\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u306f\u300cParallax Standard Servo\u300d\u3092\u4f7f\u3044\u307e\u3059\u3002Parallax Standard Servo\u306f\u5370\u52a0\u96fb\u5727\u7bc4\u56f24\uff5e6VDC\u3001\u7121\u8ca0\u8377\u6642\u306e\u96fb\u6d41\u306f100\uff4dA at 6VDC\u3067\u30010\u00b0\uff5e180\u00b0\u307e\u3067\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u3060\u3051\u3067\u3059\u306e\u3067\u3001\u30dc\u30fc\u30c9\u306e5V\u51fa\u529b\u304b\u3089\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u306b\u7d66\u96fb\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u4f55\u304b\u3092\u52d5\u304b\u3059\u7528\u9014\u3067\u4f7f\u7528\u3059\u308b\u969b\u306f\u5225\u9014\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u7528\u306e\u96fb\u6e90\u3092\u7528\u610f\u3059\u308b\u307b\u3046\u304c\u826f\u3044\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306b\u914d\u7dda\u56f3\u3092\u793a\u3057\u307e\u3059\u3002\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u306e\u96fb\u6e90\u7dda\u3001\u30b0\u30e9\u30f3\u30c9\u7dda\u3001\u4fe1\u53f7\u7dda\u3092\u305d\u308c\u305e\u308c\u30dc\u30fc\u30c9\u306e5V\u51fa\u529b\u30d4\u30f3\u3001\u30b0\u30e9\u30f3\u30c9\u30d4\u30f3\u3001\u30c7\u30b8\u30bf\u30eb3\u756a\u30d4\u30f3\u306b\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_hardsetup.png\"><img decoding=\"async\" src=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_hardsetup.png\" alt=\"\" width=\"523\" class=\"alignnone size-full wp-image-13545\" \/><\/a><\/p>\n<h2 style=\"padding: 0.2em 0.5em; border-left: solid 7px;\"><b>\u30b9\u30af\u30ea\u30d7\u30c8\u4f5c\u6210<\/b><\/h2>\n<p>\u305d\u308c\u3067\u306f\u3001MATLAB\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066Arduino\u3068\u901a\u4fe1\u3057\u3001\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u52d5\u4f5c\u3055\u305b\u307e\u3057\u3087\u3046\u3002\u4eca\u56de\u306f\u30e9\u30a4\u30d6\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3063\u3066\u9032\u3081\u307e\u3059\u3002MATLAB\u3092\u8d77\u52d5\u3057\u3001\u30db\u30fc\u30e0\u30bf\u30d6\u306e\u300c\u65b0\u898f\u30e9\u30a4\u30d6\u30b9\u30af\u30ea\u30d7\u30c8\u300d\u3092\u9078\u3076\u3068\u3001untitled.mlx\u304c\u958b\u304d\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3><b>\u30dc\u30fc\u30c9\u3068\u63a5\u7d9a<\/b><\/h3>\n<p>arduino\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u30dc\u30fc\u30c9\u3068\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u5f15\u6570\u306b\u30dc\u30fc\u30c9\u3068\u63a5\u7d9a\u3059\u308b\u30db\u30b9\u30c8PC\u306e\u30dd\u30fc\u30c8\u540d&#8221;COM5&#8243;\uff08\u30db\u30b9\u30c8PC\u306e\u30c7\u30d0\u30a4\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3001\u30dc\u30fc\u30c9\u306e\u7a2e\u985e&#8221;Uno&#8221;\u3001\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u30dc\u30fc\u30c9\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea&#8221;Servo&#8221;\u3092\u4e0e\u3048\u307e\u3059\u3002<\/p>\n<pre>arduinoObj = arduino(\"COM5\", \"Uno\", Libraries = [\"Servo\"])\r\n<\/pre>\n<p>\u4e0b\u56f3\u306e\u8d64\u67a0\u3067\u56f2\u3093\u3060\u300c\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u5b9f\u884c\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u3001\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_RunSectionButton.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_RunSectionButton.png\" alt=\"\" width=\"746\" height=\"128\" class=\"alignnone size-full wp-image-13560\" \/><\/a><\/p>\n<p>\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u66ab\u304f\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u304c\u3001\u63a5\u7d9a\u304c\u6210\u529f\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>arduinoObj = \r\n  arduino \u306e\u30d7\u30ed\u30d1\u30c6\u30a3:\r\n\r\n                  Port: 'COM5'\r\n                 Board: 'Uno'\r\n         AvailablePins: {'D2-D13', 'A0-A5'}\r\n  AvailableDigitalPins: {'D2-D13', 'A0-A5'}\r\n      AvailablePWMPins: {'D3', 'D5-D6', 'D9-D11'}\r\n   AvailableAnalogPins: {'A0-A5'}\r\n    AvailableI2CBusIDs: [0]\r\n             Libraries: {'Servo'}\r\nShow all properties\r\n<\/pre>\n<h3><b>\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3068\u63a5\u7d9a<\/b><\/h3>\n<p>\u5148\u307b\u3069\u66f8\u3044\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u672b\u5c3e\u306b\u30ab\u30fc\u30bd\u30eb\u3092\u6301\u3063\u3066\u3044\u304d\u3001\u53f3\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u51fa\u3066\u304d\u305f\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u30bb\u30af\u30b7\u30e7\u30f3\u533a\u5207\u308a\u300d\u3092\u9078\u629e\u3057\u3001\u65b0\u3057\u3044\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u3057\u307e\u3059\u3002\u305d\u3053\u306b\u3001\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\u3053\u308c\u306fservo\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3068\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u5f15\u6570\u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u901a\u4fe1\u7528\u30aa\u30d6\u30b8\u30a7\u30af\u30c8arduinoObj\u3068\u3001\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u306e\u4fe1\u53f7\u7dda\u3092\u63a5\u7d9a\u3057\u305f\u30dc\u30fc\u30c9\u306e\u30d4\u30f3\u540d&#8217;D3&#8217;\u3092\u4e0e\u3048\u307e\u3059\u3002<\/p>\n<pre>servoObj = servo(arduinoObj,'D3')\r\n<\/pre>\n<p>\u3000<br \/>\n\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>servoObj = \r\n  Servo \u306e\u30d7\u30ed\u30d1\u30c6\u30a3:\r\n\r\n                 Pin: 'D3'\r\n    MinPulseDuration: 5.44e-04 (seconds)\r\n    MaxPulseDuration: 2.40e-03 (seconds)\r\n<\/pre>\n<h3><b>\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u306e\u5236\u5fa1<\/b><\/h3>\n<p>\u300c\u30bb\u30af\u30b7\u30e7\u30f3\u533a\u5207\u308a\u300d\u3067\u65b0\u3057\u3044\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u3057\u3001\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u5236\u5fa1\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u30e9\u30a4\u30d6\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u5bfe\u8a71\u578b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u300c\u30e9\u30a4\u30d6\u30a8\u30c7\u30a3\u30bf\u30fc\u300d\u30bf\u30d6\u306e\u300c\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u914d\u7f6e\u3067\u304d\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u30e1\u30cb\u30e5\u30fc\u304c\u51fa\u3066\u304d\u307e\u3059\u306e\u3067\u3001\u305d\u3053\u304b\u3089\u300c\u30b9\u30e9\u30a4\u30c0\u30fc\u300d\u3092\u9078\u629e\u3057\u307e\u3059\uff08\u4e0b\u56f3\u8d64\u67a0\u90e8\u5206\uff09\u3002<br \/>\n<a href=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_ControlButton.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_ControlButton.png\" alt=\"\" width=\"498\" height=\"395\" class=\"alignnone size-full wp-image-13568\" \/><\/a><\/p>\n<p>\u3059\u308b\u3068\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u69cb\u6210\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff08\u30b9\u30e9\u30a4\u30c0\u30fc\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u300c\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u69cb\u6210\u300d\u3092\u9078\u3093\u3067\u3082\u8868\u793a\u3055\u308c\u307e\u3059\uff09\u306e\u3067\u3001\u300c\u5024\u300d\u306e\u6700\u5c0f\u5024\u30920\u3001\u6700\u5927\u5024\u3092180\u3001\u30b9\u30c6\u30c3\u30d7\u30921\u306b\u3057\u307e\u3059\u3002\u3053\u306e\u30b9\u30e9\u30a4\u30c0\u30fc\u3092\u4f7f\u3063\u3066\u30010\u00b0\uff5e180\u00b0\u30921\u00b0\u523b\u307f\u3067\u5236\u5fa1\u3055\u305b\u3088\u3046\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u30b9\u30e9\u30a4\u30c0\u30fc\u306e\u5de6\u5074\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30ab\u30fc\u30bd\u30eb\u304c\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u5148\u982d\u306b\u79fb\u52d5\u3057\u307e\u3059\u306e\u3067\u3001\u305d\u3053\u306b&#8221;position = &#8220;\u3068\u66f8\u3044\u3066\u3001\u30b9\u30e9\u30a4\u30c0\u30fc\u306e\u5024\u3092\u5909\u6570position\u3067\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u6539\u884c\u3057\u3066\u3001&#8221;writePosition(servoObj, position\/180.0)&#8221;\u3068\u66f8\u304d\u307e\u3059\u3002writePosition\u95a2\u6570\u306f\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3067\u3001\u7b2c1\u5f15\u6570\u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3068\u306e\u901a\u4fe1\u7528\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u7b2c2\u5f15\u6570\u306b\u89d2\u5ea6\u3092\u4e0e\u3048\u307e\u3059\u3002\u3053\u306e\u89d2\u5ea6\u306f0\uff5e1\u306e\u6570\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\u30b9\u30e9\u30a4\u30c0\u30fc\u306e\u5024\u306f0\uff5e180\u306a\u306e\u3067\u3001\u305d\u306e\u7bc4\u56f2\u304c0\uff5e1\u306b\u53ce\u307e\u308b\u3088\u3046\u306b180.0\u3067\u5272\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u306e\u4f5c\u696d\u3067\u3001\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_script.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/et.kyushu-u.ac.jp\/wp-content\/uploads\/2025\/02\/trymatlab04_script.png\" alt=\"\" width=\"324\" height=\"58\" class=\"alignnone size-full wp-image-13575\" \/><\/a><\/p>\n<p>\u305d\u308c\u3067\u306f\u30b9\u30e9\u30a4\u30c0\u30fc\u306e\u4f4d\u7f6e\u3092\u5909\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u30b9\u30e9\u30a4\u30c0\u30fc\u306e\u4f4d\u7f6e\u304c\u5909\u5316\u3059\u308b\u3068\u3001\u305d\u308c\u306b\u4f34\u3044\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u304c\u56de\u8ee2\u3057\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<h3><b>\u7d42\u4e86\u51e6\u7406<\/b><\/h3>\n<p>MATLAB\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6b8b\u3063\u3066\u3044\u308b\u3068\u3001\u65b0\u305f\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b\u7af6\u5408\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u4e0a\u306e\u5fc5\u8981\u306e\u306a\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001clear\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3053\u307e\u3081\u306b\u6d88\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>clear servoObj\r\nclear arduinoObj\r\n<\/pre>\n<h2 style=\"padding: 0.2em 0.5em; border-left: solid 7px;\"><b>\u304a\u308f\u308a\u306b<\/b><\/h2>\n<p>\u672c\u8a18\u4e8b\u3067\u306fMATLAB\u3092\u4f7f\u3063\u3066Arduino\u3068\u901a\u4fe1\u3057\u3001\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u52d5\u4f5c\u3055\u305b\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002MATLAB\u30d8\u30eb\u30d7\u30bb\u30f3\u30bf\u30fc\u306b\u306f\u3001\u69d8\u3005\u306a\u30bb\u30f3\u30b5\u30fc\u304b\u3089\u30c7\u30fc\u30bf\u3092\u30db\u30b9\u30c8PC\u306b\u53d6\u5f97\u3057\u3001\u5206\u6790\u3001\u53ef\u8996\u5316\u3059\u308b\u4f8b\u304c\u63b2\u8f09\u3055\u305b\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u662f\u975e\u3054\u6d3b\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/jp.mathworks.com\/help\/matlab\/arduinoio-sensors.html\" target=\"_blank\" rel=\"noopener\">&gt; \u30bb\u30f3\u30b5\u30fc\u304b\u3089\u306e\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u53d6\u308a<\/a><\/p>\n<p>\u6700\u5f8c\u307e\u3067\u304a\u8aad\u307f\u3044\u305f\u3060\u304d\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3054\u7406\u89e3\u3067\u304d\u306a\u3044\u70b9\u304c\u591a\u3005\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u3054\u9060\u616e\u306a\u304f\u6280\u8853\u90e8\u307e\u3067\u3054\u76f8\u8ac7\u3044\u305f\u3060\u304d\u307e\u3059\u3088\u3046\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u7533\u3057\u4e0a\u3052\u307e\u3059\u3002\u307e\u305f\u3001\u5185\u5bb9\u306b\u8aa4\u308a\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u304a\u6559\u3048\u3044\u305f\u3060\u3051\u307e\u3059\u3068\u5e78\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\uff14\u56de\uff1aArduino\u3068\u901a\u4fe1\u3059\u308b \u8a2d\u5099\u30fb\u60c5\u5831\u6280\u8853\u5ba4\u3000AI\u30fb\u30e1\u30ab\u30c8\u30ed\u30cb\u30af\u30b9\u73ed \u6728\u5ead <a href=\"https:\/\/et.kyushu-u.ac.jp\/index.php\/report\/trymatlab04\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"parent":2226,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"_links":{"self":[{"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/pages\/5920"}],"collection":[{"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/comments?post=5920"}],"version-history":[{"count":4,"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/pages\/5920\/revisions"}],"predecessor-version":[{"id":5928,"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/pages\/5920\/revisions\/5928"}],"up":[{"embeddable":true,"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/pages\/2226"}],"wp:attachment":[{"href":"https:\/\/et.kyushu-u.ac.jp\/index.php\/wp-json\/wp\/v2\/media?parent=5920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}