{"id":1185,"date":"2018-01-16T11:24:27","date_gmt":"2018-01-16T13:24:27","guid":{"rendered":"https:\/\/arduxop.com.br\/loja\/produto\/ky-027-magic-light-cup-module\/"},"modified":"2024-07-25T07:58:23","modified_gmt":"2024-07-25T11:58:23","slug":"ky-027-magic-light-cup-module","status":"publish","type":"product","link":"https:\/\/arduxop.com.br\/loja\/produto\/ky-027-magic-light-cup-module\/","title":{"rendered":"KY-027 Magic light cup module"},"content":{"rendered":"<p>Magic light cup moduleMagic Light Cup modules are easy to Interactive Technology Division developed a can and ARDUINO interactive modules, PWM dimming principle is to use the principle of two modules brightness changes. Mercury switches provide a digital signal that triggers the PWM regulator, through the program design, We can see the light like two cups filled with the effect of shuffling back and forth.&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;Example Code&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-int LedPinA = 5;int LedPinB = 6;int ButtonPinA = 7;int ButtonPinB = 4;int buttonStateA = 0;int buttonStateB = 0;int brightness = 0;void setup (){pinMode (LedPinA, OUTPUT);pinMode (LedPinB, OUTPUT);pinMode (ButtonPinA, INPUT);pinMode (ButtonPinB, INPUT);}void loop (){buttonStateA = digitalRead (ButtonPinA);if (buttonStateA == HIGH &#038;&#038; brightness! = 255){brightness + +;}buttonStateB = digitalRead (ButtonPinB);if (buttonStateB == HIGH &#038;&#038; brightness! = 0){brightness -;}analogWrite (LedPinA, brightness); \/ \/ A few Guan Yuan (ii)? analogWrite (LedPinB, 255 &#8211; brightness); \/ \/ B Yuan (ii) a few Bang? Delay (25);}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magic light cup moduleMagic Light Cup modules are easy to Interactive Technology Division developed a can and ARDUINO interactive modules, PWM dimming principle is to use the principle of two modules brightness changes. Mercury switches provide a digital signal that triggers the PWM regulator, through the program design, We can see the light like two [&hellip;]<\/p>\n","protected":false},"featured_media":1186,"template":"","meta":[],"product_brand":[],"product_cat":[178],"product_tag":[],"class_list":{"0":"post-1185","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-sensores","8":"entry","9":"has-media","11":"first","12":"instock","13":"sale","14":"sold-individually","15":"purchasable","16":"product-type-simple","17":"has-product-nav","18":"col","19":"span_1_of_3","20":"owp-content-center","21":"owp-thumbs-layout-horizontal","22":"owp-btn-normal","23":"owp-tabs-layout-horizontal"},"_links":{"self":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product\/1185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/media\/1186"}],"wp:attachment":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/media?parent=1185"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_brand?post=1185"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_cat?post=1185"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_tag?post=1185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}