{"id":1012,"date":"2017-01-27T14:46:29","date_gmt":"2017-01-27T14:46:29","guid":{"rendered":"http:\/\/easycoding.tn\/?page_id=1012"},"modified":"2020-06-05T15:20:39","modified_gmt":"2020-06-05T14:20:39","slug":"serial","status":"publish","type":"page","link":"http:\/\/easycoding.tn\/index.php\/nodemcu\/tuniot-documentation\/serial\/","title":{"rendered":"IN\/OUT"},"content":{"rendered":"<ul>\n<li><strong>Integrated LED stat <img loading=\"lazy\" class=\"wp-image-1015 alignright\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/InternalLED.png\" alt=\"InternalLED\" width=\"149\" height=\"51\" \/><\/strong><br \/>\nThis bloc will control the internal LED of the NODEMCU. (<a href=\"https:\/\/youtu.be\/HBSH_x6J1lY\">Video<\/a>)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Digital write<img loading=\"lazy\" class=\"wp-image-1019 alignright\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWrite-300x297.png\" alt=\"DigitalWrite\" width=\"139\" height=\"138\" srcset=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWrite-300x297.png 300w, http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWrite-150x150.png 150w, http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWrite.png 304w\" sizes=\"(max-width: 139px) 100vw, 139px\" \/><\/strong><br \/>\nWrite a HIGH or a LOW value to a digital pin. (<a href=\"https:\/\/youtu.be\/sNLA0MF5cOY\">Video<\/a>)Example: blinking an LED connected to the port D0<br \/>\n<img loading=\"lazy\" class=\"alignnone size-medium wp-image-1018\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWriteExemple-300x205.png\" alt=\"DigitalWriteExemple\" width=\"300\" height=\"205\" srcset=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWriteExemple-300x205.png 300w, http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/DigitalWriteExemple.png 349w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Digital read <img loading=\"lazy\" class=\"size-full wp-image-1026 alignright\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/Digitalread.png\" alt=\"Digitalread\" width=\"287\" height=\"291\" \/><\/strong><br \/>\nReads the value from a specified digital pin, either HIGH or LOW.<br \/>\n(<a href=\"https:\/\/youtu.be\/eua1CPz7j_4\">Video<\/a>)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Analog read:<\/strong><img loading=\"lazy\" class=\"size-full wp-image-1027 alignright\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/01\/AnalogRead-1.png\" alt=\"AnalogRead\" width=\"224\" height=\"45\" \/><br \/>\nReads the value from the specified analog pin. The NODEMCU has only one analog pin. It will map input voltages between 0 and 5 volts into integer values between 0 and 1023.<br \/>\n(<a href=\"https:\/\/youtu.be\/8vWoKPQqXaU\">Video<\/a>)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Analog write:<\/strong><br \/>\nWrites an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. The value parameter could be from 0 to 1023.<br \/>\nVideo: <a href=\"https:\/\/www.youtube.com\/watch?v=1BPbTjkf1U8\" target=\"_blank\" rel=\"noopener\">PWM<\/a><br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-2062\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2020\/06\/AnalogWrite.jpg\" alt=\"\" width=\"211\" height=\"90\" \/><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong><img loading=\"lazy\" class=\"size-medium alignright\" src=\"http:\/\/easycoding.tn\/wp-content\/uploads\/2017\/12\/high_low-1.jpg\" width=\"174\" height=\"90\" \/>High &#8211; Low:<\/strong><br \/>\nWill return 1 you choose High or 0 if you choose Low.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Integrated LED stat This bloc will control the internal LED of the NODEMCU. (Video) &nbsp; Digital write Write a HIGH&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1007,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/pages\/1012"}],"collection":[{"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/comments?post=1012"}],"version-history":[{"count":19,"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/pages\/1012\/revisions"}],"predecessor-version":[{"id":2063,"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/pages\/1012\/revisions\/2063"}],"up":[{"embeddable":true,"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/pages\/1007"}],"wp:attachment":[{"href":"http:\/\/easycoding.tn\/index.php\/wp-json\/wp\/v2\/media?parent=1012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}