{"id":244,"date":"2017-08-15T13:52:41","date_gmt":"2017-08-15T13:52:41","guid":{"rendered":"http:\/\/digm.drexel.edu\/uxid\/?p=244"},"modified":"2018-03-18T18:19:21","modified_gmt":"2018-03-18T18:19:21","slug":"internet-controlled-arduino-led-via-usb","status":"publish","type":"post","link":"https:\/\/philsinatra.net\/branches\/uxid\/2017\/08\/15\/internet-controlled-arduino-led-via-usb\/","title":{"rendered":"Internet Controlled Arduino LED via USB"},"content":{"rendered":"<p><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube\"><div class=\"wp-block-embed__wrapper\"><iframe  id=\"_ytid_63546\"  width=\"326\" height=\"183\"  data-origwidth=\"326\" data-origheight=\"183\" src=\"https:\/\/www.youtube.com\/embed\/eECnIvasFsg?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&modestbranding=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><br \/>\nIn order to have an Arduino controlled by a web page without the use of an Ethernet Shield, it will require the use of multiple programming languages; HTML, CSS, JS, PHP, Processing, Arduino. in this example we created a web page using php that writes a 1 or a 2 to a text file saved on the web server. This will indicate if the switch has been set to on or off. A Processing Sketch then reads this file and prints the number to the local communications port. The Arduino (connected via USB) then reads this number from the port and controls the LED based on the number read from the port.<\/p>\n<h2>HTML \/ PHP<\/h2>\n<p class=\"codepen\" data-height=\"800\" data-theme-id=\"0\" data-slug-hash=\"jLabeJ\" data-default-tab=\"html\" data-user=\"findes\" data-embed-version=\"2\" data-pen-title=\"Internet Controlled Arduino LED\">See the Pen <a href=\"https:\/\/codepen.io\/findes\/pen\/jLabeJ\/\">Internet Controlled Arduino LED<\/a> by Troy Finamore (<a href=\"https:\/\/codepen.io\/findes\">@findes<\/a>) on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script async src=\"https:\/\/production-assets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<h2>Processing Sketch<\/h2>\n<p class=\"codepen\" data-height=\"600\" data-theme-id=\"0\" data-slug-hash=\"jLabeJ\" data-default-tab=\"css\" data-user=\"findes\" data-embed-version=\"2\" data-pen-title=\"Internet Controlled Arduino LED\">See the Pen <a href=\"https:\/\/codepen.io\/findes\/pen\/jLabeJ\/\">Internet Controlled Arduino LED<\/a> by Troy Finamore (<a href=\"https:\/\/codepen.io\/findes\">@findes<\/a>) on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script async src=\"https:\/\/production-assets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<h2>Arduino Sketch<\/h2>\n<p class=\"codepen\" data-height=\"600\" data-theme-id=\"0\" data-slug-hash=\"jLabeJ\" data-default-tab=\"js\" data-user=\"findes\" data-embed-version=\"2\" data-pen-title=\"Internet Controlled Arduino LED\">See the Pen <a href=\"https:\/\/codepen.io\/findes\/pen\/jLabeJ\/\">Internet Controlled Arduino LED<\/a> by Troy Finamore (<a href=\"https:\/\/codepen.io\/findes\">@findes<\/a>) on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script async src=\"https:\/\/production-assets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p><a href=\"http:\/\/digm.drexel.edu\/uxid\/wp-content\/uploads\/2017\/08\/Screen-Shot-2017-08-15-at-1.29.29-PM.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-252 size-medium\" src=\"http:\/\/digm.drexel.edu\/uxid\/wp-content\/uploads\/2017\/08\/Screen-Shot-2017-08-15-at-1.29.29-PM-300x136.png\" alt=\"\" width=\"300\" height=\"136\" srcset=\"https:\/\/philsinatra.net\/branches\/uxid\/wp-content\/uploads\/2017\/08\/Screen-Shot-2017-08-15-at-1.29.29-PM-300x136.png 300w, https:\/\/philsinatra.net\/branches\/uxid\/wp-content\/uploads\/2017\/08\/Screen-Shot-2017-08-15-at-1.29.29-PM-768x347.png 768w, https:\/\/philsinatra.net\/branches\/uxid\/wp-content\/uploads\/2017\/08\/Screen-Shot-2017-08-15-at-1.29.29-PM-1024x463.png 1024w, https:\/\/philsinatra.net\/branches\/uxid\/wp-content\/uploads\/2017\/08\/Screen-Shot-2017-08-15-at-1.29.29-PM.png 1377w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to have an Arduino controlled by a web page without the use of an Ethernet Shield, it will require the use of multiple programming languages; HTML, CSS, JS, PHP, Processing, Arduino. in this example we created a web page using php that writes a 1 or a 2 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":248,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,11],"tags":[21],"_links":{"self":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts\/244"}],"collection":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/comments?post=244"}],"version-history":[{"count":8,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts\/244\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts\/244\/revisions\/254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/media\/248"}],"wp:attachment":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/media?parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/categories?post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/tags?post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}