{"id":43100,"date":"2018-06-22T23:14:29","date_gmt":"2018-06-22T17:14:29","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=43100"},"modified":"2018-06-24T00:34:01","modified_gmt":"2018-06-23T18:34:01","slug":"break-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=43100","title":{"rendered":"break (Arduino)"},"content":{"rendered":"<p><strong>break<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u043e\u0432 do, for \u0438\u043b\u0438 while, \u043d\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u0430 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 switch.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre style=\"background: #0c1021; color: #f8f8f8;\"><span style=\"color: #8da6ce;\">void<\/span> setup(){\r\n  pinMode(A1,INPUT);\r\n}\r\n<span style=\"color: #8da6ce;\">int<\/span> i;\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> loop(){\r\n  <span style=\"color: #fbde2d;\">for<\/span>(i<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">0<\/span>;i&lt;<span style=\"color: #d8fa3c;\">100<\/span>;i<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>){\r\n    <span style=\"color: #fbde2d;\">if<\/span>(analogRead(A1)&gt;<span style=\"color: #d8fa3c;\">500<\/span>){\r\n      <span style=\"color: #fbde2d;\">break<\/span>;\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0446\u0438\u043a\u043b <strong>for<\/strong>, \u043f\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f<strong> i<\/strong> \u043c\u0435\u043d\u044c\u0448\u0435 100 \u0446\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <strong>if<\/strong> \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 <strong>\u04101<\/strong>, \u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u0442 500, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>break \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u043e\u0432 do, for \u0438\u043b\u0438 while, \u043d\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u0430 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 switch. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: void setup(){ pinMode(A1,INPUT); } int i; void loop(){ for(i=0;i&lt;100;i++){ if(analogRead(A1)&gt;500){ break; } } } \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0446\u0438\u043a\u043b for, \u043f\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f i \u043c\u0435\u043d\u044c\u0448\u0435 100 \u0446\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 if \u0432 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":43063,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-43100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":2880,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/43100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43100"}],"version-history":[{"count":2,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/43100\/revisions"}],"predecessor-version":[{"id":43105,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/43100\/revisions\/43105"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/43063"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}