{"id":910,"date":"2023-10-05T18:58:32","date_gmt":"2023-10-05T18:58:32","guid":{"rendered":"https:\/\/iotmanager.org\/?p=910"},"modified":"2023-10-05T19:03:05","modified_gmt":"2023-10-05T19:03:05","slug":"%d0%ba%d0%bd%d0%be%d0%bf%d0%ba%d0%b0-%d0%bf%d0%be%d0%b4%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%bd%d0%b0%d1%8f-%d1%84%d0%b8%d0%b7%d0%b8%d1%87%d0%b5%d1%81%d0%ba%d0%b8","status":"publish","type":"post","link":"https:\/\/iotmanager.org\/en\/2023\/10\/05\/910\/","title":{"rendered":"Button (physically connected)"},"content":{"rendered":"<p>This module is used to describe the input button. This is about a Gpio configured as an input.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"140\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9.png\" alt=\"\" class=\"wp-image-917\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9.png 1024w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9-600x82.png 600w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9-300x41.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9-768x105.png 768w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-9-18x2.png 18w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Int &#8212; \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f<br>pin &#8212; \u043d\u043e\u043c\u0435\u0440 Gpio \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430<br>pinMode &#8212; \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c INPUT_PULLUP INPUT_PULLDOWN INPUT<br>debounceDelay &#8212; \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0440\u0435\u0431\u0435\u0437\u0433\u0430<br>execLevel &#8212; \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f High \u0438\u043b\u0438 Low<br>fixState &#8212; \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u0430, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0438\u043b\u0438 \u043d\u0430 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0443\u0440\u043e\u0432\u043d\u044f (\u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c)<\/p>\n\n\n\n<p>To understand the dependence of the input behavior on the execLevel and fixState states, we present a table built after the fact:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Customization<\/th><th>at input 1<\/th><th>input 0<\/th><\/tr><tr><td>execLevel 0<\/td><td>High<\/td><td><\/td><\/tr><tr><td>fixState 0<\/td><td><\/td><td>Low<\/td><\/tr><tr><td>execLevel 1<\/td><td>High<\/td><td><\/td><\/tr><tr><td>fixState 0<\/td><td><\/td><td>Low<\/td><\/tr><tr><td>execLevel 1<\/td><td>High TM<\/td><td><\/td><\/tr><tr><td>fixState 1<\/td><td><\/td><td>High TM<\/td><\/tr><tr><td>execLevel 0<\/td><td>Low TM<\/td><td><\/td><\/tr><tr><td>fixState 1<\/td><td><\/td><td>Low TM<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Explanations to the table, High TM is a mode where 1 and 0 are fixed by a high level, but to change the state, you must first switch to a low level. The next high level will change state again. This mode is also sometimes referred to as high edge state switching.<br>Low TM is a low edge state switch.<\/p>","protected":false},"excerpt":{"rendered":"<p>This module is used to describe the input button. This is about a Gpio configured as an input. Int-not used yet Pin-Gpio number for this input pinMode-can be INPUT_PULLUP INPUT_PULLDOWN INPUTdebounceDelay \u2014 bounce processing timeexeclevel \u2014 trigger level High or LowfixState-input behavior, triggered on transition or on level fixation (trigger mode) For understanding \u2026 <a title=\"Button (physically connected)\" class=\"read-more\" href=\"https:\/\/iotmanager.org\/en\/2023\/10\/05\/910\/\" aria-label=\"More on \u041a\u043d\u043e\u043f\u043a\u0430 (\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u0430\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438)\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[76],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts\/910"}],"collection":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/comments?post=910"}],"version-history":[{"count":2,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts\/910\/revisions"}],"predecessor-version":[{"id":918,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts\/910\/revisions\/918"}],"wp:attachment":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/media?parent=910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/categories?post=910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/tags?post=910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}