{"id":135195,"date":"2026-07-10T09:26:51","date_gmt":"2026-07-10T03:26:51","guid":{"rendered":"https:\/\/rcl-radio.ru\/?p=135195"},"modified":"2026-07-10T09:28:26","modified_gmt":"2026-07-10T03:28:26","slug":"%d0%bf%d0%b5%d1%80%d0%b5%d0%bc%d0%b5%d0%bd%d0%bd%d1%8b%d0%b5-%d0%b2-arduino-%d0%be%d1%81%d0%bd%d0%be%d0%b2%d1%8b-%d0%b8-%d0%bf%d1%80%d0%b0%d0%ba%d1%82%d0%b8%d0%ba%d0%b0","status":"publish","type":"post","link":"https:\/\/rcl-radio.ru\/?p=135195","title":{"rendered":"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 Arduino: \u043e\u0441\u043d\u043e\u0432\u044b \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430"},"content":{"rendered":"<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 Arduino\u00a0\u2014\u00a0\u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u0412 \u0441\u043a\u0435\u0442\u0447\u0430\u0445 \u043d\u0430 Arduino (\u044f\u0437\u044b\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 C\/C++) \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430.<\/p>\n<hr \/>\n<h2>\u041a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/h2>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\">\u0442\u0438\u043f \u0438\u043c\u044f_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;<\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #0066cc;\">int<\/span> ledPin = <span style=\"color: #cc66cc;\">13<\/span>;          <span style=\"color: #808080; font-style: italic;\">\/\/ \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/span>\r\nfloat temperature = <span style=\"color: #cc66cc;\">25.5<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439<\/span>\r\nbool isOn = <span style=\"color: #000000; font-weight: bold;\">true<\/span>;         <span style=\"color: #808080; font-style: italic;\">\/\/ \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/span>\r\nchar letter = <span style=\"color: #ff0000;\">'A'<\/span>;        <span style=\"color: #808080; font-style: italic;\">\/\/ \u043e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b<\/span>\r\n<span style=\"color: #0066cc;\">String<\/span> <span style=\"color: #0066cc;\">message<\/span> = <span style=\"color: #ff0000;\">\"Hello\"<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0441\u0442\u0440\u043e\u043a\u0430 (\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e)<\/span><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #0066cc;\">int<\/span> counter;\r\ncounter = <span style=\"color: #cc66cc;\">0<\/span>;<\/pre>\n<hr \/>\n<h2>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Arduino<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u0422\u0438\u043f<\/th>\n<th>\u0420\u0430\u0437\u043c\u0435\u0440<\/th>\n<th>\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \/ \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/th>\n<th>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code class=\"CodeInlined\">bool<\/code><\/td>\n<td>1 \u0431\u0430\u0439\u0442<\/td>\n<td><code class=\"CodeInlined\">true<\/code> \/ <code class=\"CodeInlined\">false<\/code><\/td>\n<td>\u0424\u043b\u0430\u0433\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e)<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">byte<\/code><\/td>\n<td>1 \u0431\u0430\u0439\u0442<\/td>\n<td>0\u2013255<\/td>\n<td>\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u0435\u043b<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">int<\/code><\/td>\n<td>2 \u0431\u0430\u0439\u0442\u0430<\/td>\n<td>\u221232\u00a0768\u202632\u00a0767<\/td>\n<td>\u0421\u0447\u0451\u0442\u0447\u0438\u043a\u0438, \u043f\u0438\u043d\u044b, \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">unsigned int<\/code><\/td>\n<td>2 \u0431\u0430\u0439\u0442\u0430<\/td>\n<td>0\u201365\u00a0535<\/td>\n<td>\u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">long<\/code><\/td>\n<td>4 \u0431\u0430\u0439\u0442\u0430<\/td>\n<td>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/td>\n<td>\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">float<\/code><\/td>\n<td>4 \u0431\u0430\u0439\u0442\u0430<\/td>\n<td>\u0427\u0438\u0441\u043b\u0430 \u0441 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e<\/td>\n<td>\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">char<\/code><\/td>\n<td>1 \u0431\u0430\u0439\u0442<\/td>\n<td>\u041e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b (ASCII)<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b<\/td>\n<\/tr>\n<tr>\n<td><code class=\"CodeInlined\">String<\/code><\/td>\n<td>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439<\/td>\n<td>\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/td>\n<td>\u0423\u0434\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0443\u0447\u0443<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote class=\"FuturisMarkdown-BlockQuote\"><p>\u0414\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 Arduino \u0447\u0430\u0441\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c <code class=\"CodeInlined\">String<\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b <code class=\"CodeInlined\">char[]<\/code>, \u0435\u0441\u043b\u0438 \u0432\u0430\u0436\u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p><\/blockquote>\n<hr \/>\n<h2>\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438: \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h2>\n<p><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435<\/strong>\u00a0\u2014\u00a0\u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u0434\u043e <code class=\"CodeInlined\">setup()<\/code>), \u0432\u0438\u0434\u043d\u044b \u0432\u0435\u0437\u0434\u0435, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #0066cc;\">int<\/span> globalCounter = <span style=\"color: #cc66cc;\">0<\/span>;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  globalCounter++;\r\n  Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>globalCounter<span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435<\/strong> \u2014 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u0431\u043b\u043e\u043a\u0430, \u0432\u0438\u0434\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043c, \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0431\u043b\u043e\u043a\u0430:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  <span style=\"color: #0066cc;\">int<\/span> localCounter = <span style=\"color: #cc66cc;\">0<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 loop()<\/span>\r\n  localCounter++;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u043d\u0430\u0440\u0443\u0436\u0438, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443: <code class=\"CodeInlined\">error: 'localCounter' was not declared in this scope<\/code>.<\/p>\n<hr \/>\n<h2>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b (<code class=\"CodeInlined\">const<\/code>) \u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b (<code class=\"CodeInlined\">#define<\/code>)<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code class=\"CodeInlined\">const<\/code>:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\">const <span style=\"color: #0066cc;\">int<\/span> LED_PIN = <span style=\"color: #cc66cc;\">13<\/span>;\r\nconst float <span style=\"color: #0066cc;\">PI<\/span> = <span style=\"color: #cc66cc;\">3.14159<\/span>;<\/pre>\n<p>\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c <code class=\"CodeInlined\">const<\/code>-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438\u00a0\u2014\u00a0\u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430\u00a0\u2014\u00a0<code class=\"CodeInlined\">#define<\/code> (\u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438):<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #808080; font-style: italic;\">#define LED_PIN 13<\/span><\/pre>\n<p><code class=\"CodeInlined\">const<\/code> \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0442\u0438\u043f \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 <code class=\"CodeInlined\">#define<\/code>\u00a0\u2014\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430.<\/p>\n<hr \/>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u0438\u0433\u0430\u043d\u0438\u0435 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h2>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 12px;\">const <span style=\"color: #0066cc;\">int<\/span> ledPin = <span style=\"color: #cc66cc;\">13<\/span>;      <span style=\"color: #808080; font-style: italic;\">\/\/ \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430: \u043f\u0438\u043d \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430<\/span>\r\n<span style=\"color: #0066cc;\">int<\/span> blinkCount = <span style=\"color: #cc66cc;\">0<\/span>;         <span style=\"color: #808080; font-style: italic;\">\/\/ \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043c\u0438\u0433\u0430\u043d\u0438\u0439<\/span>\r\nunsigned long lastBlink = <span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043c\u0438\u0433\u0430\u043d\u0438\u044f<\/span>\r\nconst long interval = <span style=\"color: #cc66cc;\">500<\/span>;  <span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432 \u043c\u0441<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  pinMode<span style=\"color: #66cc66;\">(<\/span>ledPin, OUTPUT<span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  unsigned long currentMillis = millis<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>currentMillis - lastBlink <span style=\"color: #66cc66;\">&gt;<\/span>= interval<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n    lastBlink = currentMillis;\r\n    digitalWrite<span style=\"color: #66cc66;\">(<\/span>ledPin, <span style=\"color: #66cc66;\">!<\/span>digitalRead<span style=\"color: #66cc66;\">(<\/span>ledPin<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/span>\r\n    blinkCount++;\r\n    Serial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"\u041c\u0438\u0433\u0430\u043d\u0438\u0439: \"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n    Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>blinkCount<span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<hr \/>\n<h2>\u0412\u0430\u0436\u043d\u044b\u0435 \u043d\u044e\u0430\u043d\u0441\u044b \u0434\u043b\u044f Arduino<\/h2>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><strong>\u041f\u0430\u043c\u044f\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430.<\/strong> \u041d\u0430 Arduino Uno \u0432\u0441\u0435\u0433\u043e 2 \u041a\u0411 SRAM. \u0418\u0437\u0431\u044b\u0442\u043e\u043a \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e <code class=\"CodeInlined\">String<\/code>, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u0431\u043e\u044f\u043c \u0438 \u00ab\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c\u0443\u00bb \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432.<\/strong> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code class=\"CodeInlined\">byte x = 255; x++;<\/code> \u0434\u0430\u0441\u0442 <code class=\"CodeInlined\">0<\/code>. \u0412\u0441\u0435\u0433\u0434\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0442\u0438\u043f\u043e\u0432.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/strong> \u041b\u0443\u0447\u0448\u0435 \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/li>\n<li data-value=\"\" data-shift=\"0\"><strong>\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435.<\/strong> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430: <code class=\"CodeInlined\">sensorValue<\/code>, <code class=\"CodeInlined\">buttonState<\/code>. \u0414\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u00a0\u2014\u00a0\u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440: <code class=\"CodeInlined\">MAX_TEMP<\/code>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 Arduino\u00a0\u2014\u00a0\u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u0412 \u0441\u043a\u0435\u0442\u0447\u0430\u0445 \u043d\u0430 Arduino (\u044f\u0437\u044b\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 C\/C++) \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430. \u041a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: \u0442\u0438\u043f \u0438\u043c\u044f_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435; \u041f\u0440\u0438\u043c\u0435\u0440\u044b: int ledPin = 13; \/\/ \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e float temperature = 25.5; \/\/ \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 bool isOn = true; \/\/ [&hellip;]<\/p>\n","protected":false},"author":9194254,"featured_media":135196,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,27],"tags":[],"class_list":["post-135195","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-27"],"views":9,"_links":{"self":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/9194254"}],"replies":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135195"}],"version-history":[{"count":2,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135195\/revisions"}],"predecessor-version":[{"id":135198,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135195\/revisions\/135198"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/135196"}],"wp:attachment":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}